summaryrefslogtreecommitdiffstats
path: root/sys-utils/readprofile.c
diff options
context:
space:
mode:
authorPetr Uzel2011-09-22 12:12:37 +0200
committerKarel Zak2011-09-27 15:46:07 +0200
commit960cf5737e58c03b0d29797c0d4bd3461f1fdeff (patch)
tree10cc302358d2ffa6673010b3e8cebbb924570ab6 /sys-utils/readprofile.c
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 'sys-utils/readprofile.c')
-rw-r--r--sys-utils/readprofile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index 0e124bc71..49f0cbd6c 100644
--- a/sys-utils/readprofile.c
+++ b/sys-utils/readprofile.c
@@ -211,8 +211,8 @@ main(int argc, char **argv) {
exit(1);
}
if (write(fd, &multiplier, to_write) != to_write) {
- fprintf(stderr, _("readprofile: error writing %s: %s\n"),
- defaultpro, strerror(errno));
+ fprintf(stderr, _("readprofile: error writing %s: %m\n"),
+ defaultpro);
exit(1);
}
close(fd);
@@ -225,7 +225,7 @@ main(int argc, char **argv) {
if (((proFd=open(proFile,O_RDONLY)) < 0)
|| ((int)(len=lseek(proFd,0,SEEK_END)) < 0)
|| (lseek(proFd,0,SEEK_SET) < 0)) {
- fprintf(stderr,"%s: %s: %s\n",prgname,proFile,strerror(errno));
+ fprintf(stderr,"%s: %s: %m\n", prgname, proFile);
exit(1);
}
@@ -233,7 +233,7 @@ main(int argc, char **argv) {
rc = read(proFd,buf,len);
if (rc < 0 || (size_t) rc != len) {
- fprintf(stderr,"%s: %s: %s\n",prgname,proFile,strerror(errno));
+ fprintf(stderr,"%s: %s: %m\n", prgname, proFile);
exit(1);
}
close(proFd);