]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/utils.c
log: change ERROR macro using sterror to SYSERROR
[mirror_lxc.git] / src / lxc / utils.c
index 39676c7e092adb8c9a7bea45274b0fae03f2f810..85cc85eda1ba32369fbe320e830f3d4b1c2b6e49 100644 (file)
@@ -1030,8 +1030,10 @@ int lxc_read_from_file(const char *filename, void* buf, size_t count)
        if (!buf || !count) {
                char buf2[100];
                size_t count2 = 0;
+
                while ((ret = read(fd, buf2, 100)) > 0)
                        count2 += ret;
+
                if (ret >= 0)
                        ret = count2;
        } else {
@@ -1040,7 +1042,7 @@ int lxc_read_from_file(const char *filename, void* buf, size_t count)
        }
 
        if (ret < 0)
-               ERROR("read %s: %s", filename, strerror(errno));
+               SYSERROR("Read %s", filename);
 
        saved_errno = errno;
        close(fd);