procd: Add %m to several functions that return errno.
[project/procd.git] / jail / fs.c
index f390180..8cc47d3 100644 (file)
--- a/jail/fs.c
+++ b/jail/fs.c
@@ -86,7 +86,7 @@ static int add_script_interp(const char *path, const char *map, int size)
                start++;
        }
        if (start >= size) {
-               ERROR("bad script interp (%s)", path);
+               ERROR("bad script interp (%s)\n", path);
                return -1;
        }
        int stop = start + 1;
@@ -94,7 +94,7 @@ static int add_script_interp(const char *path, const char *map, int size)
                stop++;
        }
        if (stop >= size || (stop-start) > PATH_MAX) {
-               ERROR("bad script interp (%s)", path);
+               ERROR("bad script interp (%s)\n", path);
                return -1;
        }
        char buf[PATH_MAX];
@@ -135,7 +135,7 @@ int add_path_and_deps(const char *path, int readonly, int error, int lib)
 
        struct stat s;
        if (fstat(fd, &s) == -1) {
-               ERROR("fstat(%s) failed: %s\n", path, strerror(errno));
+               ERROR("fstat(%s) failed: %m\n", path);
                ret = error;
                goto out;
        }
@@ -153,7 +153,7 @@ int add_path_and_deps(const char *path, int readonly, int error, int lib)
 
        map = mmap(NULL, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
        if (map == MAP_FAILED) {
-               ERROR("failed to mmap %s\n", path);
+               ERROR("failed to mmap %s: %m\n", path);
                ret = -1;
                goto out;
        }