[vlc-commits] ncurses: use vlc_strerror_c()

Rémi Denis-Courmont git at videolan.org
Sun Dec 29 15:16:33 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Dec 29 15:59:12 2013 +0200| [02b29e145824b409f8bedba7b94c530ad3cd0f8b] | committer: Rémi Denis-Courmont

ncurses: use vlc_strerror_c()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=02b29e145824b409f8bedba7b94c530ad3cd0f8b
---

 modules/gui/ncurses.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/ncurses.c b/modules/gui/ncurses.c
index 1ed633b..bd59a60 100644
--- a/modules/gui/ncurses.c
+++ b/modules/gui/ncurses.c
@@ -40,6 +40,7 @@
 #include <wchar.h>
 #include <sys/stat.h>
 #include <math.h>
+#include <errno.h>
 
 #include <vlc_common.h>
 #include <vlc_plugin.h>
@@ -274,7 +275,8 @@ static void ReadDir(intf_thread_t *intf)
 
     DIR *current_dir = vlc_opendir(sys->current_dir);
     if (!current_dir) {
-        msg_Warn(intf, "cannot open directory `%s' (%m)", sys->current_dir);
+        msg_Warn(intf, "cannot open directory `%s' (%s)", sys->current_dir,
+                 vlc_strerror_c(errno));
         return;
     }
 
@@ -1853,7 +1855,7 @@ static int Open(vlc_object_t *p_this)
 
     /* Stop printing errors to the console */
     if (!freopen("/dev/null", "wb", stderr))
-        msg_Err(intf, "Couldn't close stderr (%m)");
+        msg_Err(intf, "Couldn't close stderr (%s)", vlc_strerror_c(errno));
 
     ReadDir(intf);
     PL_LOCK;



More information about the vlc-commits mailing list