summaryrefslogtreecommitdiffstats
path: root/fdisk
diff options
context:
space:
mode:
authorPetr Uzel2011-09-22 12:12:37 +0200
committerKarel Zak2011-09-27 15:46:07 +0200
commit960cf5737e58c03b0d29797c0d4bd3461f1fdeff (patch)
tree10cc302358d2ffa6673010b3e8cebbb924570ab6 /fdisk
parentdocs: update TODO (diff)
downloadkernel-qcow2-util-linux-960cf5737e58c03b0d29797c0d4bd3461f1fdeff.tar.gz
kernel-qcow2-util-linux-960cf5737e58c03b0d29797c0d4bd3461f1fdeff.tar.xz
kernel-qcow2-util-linux-960cf5737e58c03b0d29797c0d4bd3461f1fdeff.zip
misc: use %m in format string instead of %s and strerror(errno)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'fdisk')
-rw-r--r--fdisk/fdisk.c4
-rw-r--r--fdisk/gpt.c3
2 files changed, 3 insertions, 4 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 1c1f49211..249de7101 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -2631,10 +2631,10 @@ reread_partition_table(int leave) {
}
if (i) {
- printf(_("\nWARNING: Re-reading the partition table failed with error %d: %s.\n"
+ printf(_("\nWARNING: Re-reading the partition table failed with error %d: %m.\n"
"The kernel still uses the old table. The new table will be used at\n"
"the next reboot or after you run partprobe(8) or kpartx(8)\n"),
- errno, strerror(errno));
+ errno);
}
if (dos_changed)
diff --git a/fdisk/gpt.c b/fdisk/gpt.c
index ff659fd8e..aeacd6624 100644
--- a/fdisk/gpt.c
+++ b/fdisk/gpt.c
@@ -106,8 +106,7 @@ last_lba(int fd)
rc = fstat(fd, &s);
if (rc == -1)
{
- fprintf(stderr, "last_lba() could not stat: %s\n",
- strerror(errno));
+ fprintf(stderr, "last_lba() could not stat: %m\n");
return 0;
}
if (S_ISBLK(s.st_mode))