]> code.delx.au - pulseaudio/blobdiff - src/polypcore/core-scache.c
* split pa_cstrerror() into its own file polypcore/core-error.[ch]
[pulseaudio] / src / polypcore / core-scache.c
index 068f2361d97839bdfe8ad5f392b8f7caf930f12c..b44a7e198018fee7d5c89a1f5754742e719d67ac 100644 (file)
@@ -43,6 +43,8 @@
 
 #include <polyp/mainloop.h>
 #include <polyp/channelmap.h>
+#include <polyp/timeval.h>
+#include <polyp/util.h>
 #include <polyp/volume.h>
 #include <polyp/xmalloc.h>
 
@@ -54,6 +56,7 @@
 #include <polypcore/sound-file.h>
 #include <polypcore/core-util.h>
 #include <polypcore/log.h>
+#include <polypcore/core-error.h>
 
 #include "core-scache.h"
 
@@ -357,7 +360,7 @@ static void add_file(pa_core *c, const char *pathname) {
     e = pa_path_get_filename(pathname);
     
     if (stat(pathname, &st) < 0) {
-        pa_log(__FILE__": stat('%s') failed: %s", pathname, strerror(errno));
+        pa_log(__FILE__": stat('%s'): %s", pathname, pa_cstrerror(errno));
         return;
     }
 
@@ -379,7 +382,7 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) {
         /* If that fails, try to open it as shell glob */
 
         if (glob(pathname, GLOB_ERR|GLOB_NOSORT, NULL, &p) < 0) {
-            pa_log(__FILE__": Failed to open directory: %s", strerror(errno));
+            pa_log(__FILE__": failed to open directory '%s': %s", pathname, pa_cstrerror(errno));
             return -1;
         }