diff options
author | Rosen Penev <rosenp@gmail.com> | 2017-12-09 20:54:41 -0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-12-12 11:52:53 +0100 |
commit | ef2cc03b52ba2d3d19de7c9e72e0131eab631e5a (patch) | |
tree | f925b2092adf36b5968cf80af23fd33821bcbd59 /libfstools/overlay.c | |
parent | 98fd5b40a70dc18e56134b0b48d224698228943e (diff) | |
download | fstools-ef2cc03b52ba2d3d19de7c9e72e0131eab631e5a.tar.gz |
fstools: Replace strerror(errno) with %m format.
Saves 1472 bytes under glibc. No other difference.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'libfstools/overlay.c')
-rw-r--r-- | libfstools/overlay.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libfstools/overlay.c b/libfstools/overlay.c index 5a49da2..7ada5ff 100644 --- a/libfstools/overlay.c +++ b/libfstools/overlay.c @@ -102,12 +102,12 @@ static int overlay_mount(struct volume *v, char *fs) { if (mkdir("/tmp/overlay", 0755)) { - ULOG_ERR("failed to mkdir /tmp/overlay: %s\n", strerror(errno)); + ULOG_ERR("failed to mkdir /tmp/overlay: %m\n"); return -1; } if (mount(v->blk, "/tmp/overlay", fs, MS_NOATIME, NULL)) { - ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %s\n", fs, v->blk, strerror(errno)); + ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %m\n", fs, v->blk); return -1; } @@ -129,27 +129,27 @@ switch2jffs(struct volume *v) ret = mount(v->blk, "/rom/overlay", "jffs2", MS_NOATIME, NULL); unlink("/tmp/.switch_jffs2"); if (ret) { - ULOG_ERR("failed - mount -t jffs2 %s /rom/overlay: %s\n", v->blk, strerror(errno)); + ULOG_ERR("failed - mount -t jffs2 %s /rom/overlay: %m\n", v->blk); return -1; } if (mount("none", "/", NULL, MS_NOATIME | MS_REMOUNT, 0)) { - ULOG_ERR("failed - mount -o remount,ro none: %s\n", strerror(errno)); + ULOG_ERR("failed - mount -o remount,ro none: %m\n"); return -1; } if (system("cp -a /tmp/root/* /rom/overlay")) { - ULOG_ERR("failed - cp -a /tmp/root/* /rom/overlay: %s\n", strerror(errno)); + ULOG_ERR("failed - cp -a /tmp/root/* /rom/overlay: %m\n"); return -1; } if (pivot("/rom", "/mnt")) { - ULOG_ERR("failed - pivot /rom /mnt: %s\n", strerror(errno)); + ULOG_ERR("failed - pivot /rom /mnt: %m\n"); return -1; } if (mount_move("/mnt", "/tmp/root", "")) { - ULOG_ERR("failed - mount -o move /mnt /tmp/root %s\n", strerror(errno)); + ULOG_ERR("failed - mount -o move /mnt /tmp/root %m\n"); return -1; } @@ -267,13 +267,13 @@ static int overlay_mount_fs(struct volume *v) char *fstype = overlay_fs_name(volume_identify(v)); if (mkdir("/tmp/overlay", 0755)) { - ULOG_ERR("failed to mkdir /tmp/overlay: %s\n", strerror(errno)); + ULOG_ERR("failed to mkdir /tmp/overlay: %m\n"); return -1; } if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME, NULL)) { - ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %s\n", - fstype, v->blk, strerror(errno)); + ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %m\n", + fstype, v->blk); return -1; } |