[vlc-commits] shm: use vlc_strerror_c()

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


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Dec 28 19:58:50 2013 +0200| [983ca412b969f1a4f4252a18f44c11c70efc8d5a] | committer: Rémi Denis-Courmont

shm: use vlc_strerror_c()

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

 modules/access/shm.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/access/shm.c b/modules/access/shm.c
index 99b64ae..45db3c7 100644
--- a/modules/access/shm.c
+++ b/modules/access/shm.c
@@ -26,6 +26,7 @@
 
 #include <stdarg.h>
 #include <math.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <unistd.h>
 #ifdef HAVE_SYS_SHM_H
@@ -182,7 +183,8 @@ static int Open (vlc_object_t *obj)
     {
         sys->fd = vlc_open (path, O_RDONLY);
         if (sys->fd == -1)
-            msg_Err (demux, "cannot open file %s: %m", path);
+            msg_Err (demux, "cannot open file %s: %s", path,
+                     vlc_strerror_c(errno));
         free (path);
         if (sys->fd == -1)
             goto error;
@@ -204,7 +206,8 @@ static int Open (vlc_object_t *obj)
 
         if (mem == (const void *)(-1))
         {
-            msg_Err (demux, "cannot attach segment %d: %m", id);
+            msg_Err (demux, "cannot attach segment %d: %s", id,
+                     vlc_strerror_c(errno));
             goto error;
         }
         sys->mem.addr = mem;



More information about the vlc-commits mailing list