diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/mkfifo.c | 6 | ||||
-rw-r--r-- | coreutils/mknod.c | 2 | ||||
-rw-r--r-- | coreutils/sleep.c | 6 | ||||
-rw-r--r-- | coreutils/uname.c | 4 |
4 files changed, 7 insertions, 11 deletions
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c index ef4a5256f..728e1ec2f 100644 --- a/coreutils/mkfifo.c +++ b/coreutils/mkfifo.c | |||
@@ -53,9 +53,7 @@ extern int mkfifo_main(int argc, char **argv) | |||
53 | } | 53 | } |
54 | if (argc < 1 || *argv[0] == '-') | 54 | if (argc < 1 || *argv[0] == '-') |
55 | usage(mkfifo_usage); | 55 | usage(mkfifo_usage); |
56 | if (mkfifo(*argv, mode) < 0) { | 56 | if (mkfifo(*argv, mode) < 0) |
57 | perror("mkfifo"); | 57 | perror_msg_and_die("mkfifo"); |
58 | return EXIT_FAILURE; | ||
59 | } | ||
60 | return EXIT_SUCCESS; | 58 | return EXIT_SUCCESS; |
61 | } | 59 | } |
diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 022ab8571..4d8c598ea 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c | |||
@@ -84,7 +84,7 @@ int mknod_main(int argc, char **argv) | |||
84 | mode |= perm; | 84 | mode |= perm; |
85 | 85 | ||
86 | if (mknod(argv[0], mode, dev) != 0) | 86 | if (mknod(argv[0], mode, dev) != 0) |
87 | error_msg_and_die("%s: %s\n", argv[0], strerror(errno)); | 87 | perror_msg_and_die("%s", argv[0]); |
88 | return EXIT_SUCCESS; | 88 | return EXIT_SUCCESS; |
89 | } | 89 | } |
90 | 90 | ||
diff --git a/coreutils/sleep.c b/coreutils/sleep.c index ad92b106d..10eca593e 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c | |||
@@ -30,9 +30,7 @@ extern int sleep_main(int argc, char **argv) | |||
30 | usage(sleep_usage); | 30 | usage(sleep_usage); |
31 | } | 31 | } |
32 | 32 | ||
33 | if (sleep(atoi(*(++argv))) != 0) { | 33 | if (sleep(atoi(*(++argv))) != 0) |
34 | perror("sleep"); | 34 | perror_msg_and_die("sleep"); |
35 | return EXIT_FAILURE; | ||
36 | } | ||
37 | return EXIT_SUCCESS; | 35 | return EXIT_SUCCESS; |
38 | } | 36 | } |
diff --git a/coreutils/uname.c b/coreutils/uname.c index 2781b80b3..e7e9ff331 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -114,11 +114,11 @@ int uname_main(int argc, char **argv) | |||
114 | toprint = PRINT_SYSNAME; | 114 | toprint = PRINT_SYSNAME; |
115 | 115 | ||
116 | if (uname(&name) == -1) | 116 | if (uname(&name) == -1) |
117 | perror("cannot get system name"); | 117 | perror_msg("cannot get system name"); |
118 | 118 | ||
119 | #if defined (HAVE_SYSINFO) && defined (SI_ARCHITECTURE) | 119 | #if defined (HAVE_SYSINFO) && defined (SI_ARCHITECTURE) |
120 | if (sysinfo(SI_ARCHITECTURE, processor, sizeof(processor)) == -1) | 120 | if (sysinfo(SI_ARCHITECTURE, processor, sizeof(processor)) == -1) |
121 | perror("cannot get processor type"); | 121 | perror_msg("cannot get processor type"); |
122 | } | 122 | } |
123 | 123 | ||
124 | #else | 124 | #else |