diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/fbset.c | 3 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 5 | ||||
-rw-r--r-- | util-linux/rdate.c | 2 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 1 |
4 files changed, 5 insertions, 6 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 72284a6c5..be1e3c3f1 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -198,8 +198,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn, | |||
198 | char buf[256]; | 198 | char buf[256]; |
199 | char *p = buf; | 199 | char *p = buf; |
200 | 200 | ||
201 | if ((f = fopen(fn, "r")) == NULL) | 201 | f = xfopen(fn, "r"); |
202 | perror_msg_and_die("readmode(fopen)"); | ||
203 | while (!feof(f)) { | 202 | while (!feof(f)) { |
204 | fgets(buf, sizeof(buf), f); | 203 | fgets(buf, sizeof(buf), f); |
205 | if ((p = strstr(buf, "mode ")) || (p = strstr(buf, "mode\t"))) { | 204 | if ((p = strstr(buf, "mode ")) || (p = strstr(buf, "mode\t"))) { |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index b666338dc..928a49674 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -683,10 +683,7 @@ char *filename; | |||
683 | FILE *listfile; | 683 | FILE *listfile; |
684 | unsigned long blockno; | 684 | unsigned long blockno; |
685 | 685 | ||
686 | listfile = fopen(filename, "r"); | 686 | listfile = xfopen(filename, "r"); |
687 | if (listfile == (FILE *) NULL) { | ||
688 | error_msg_and_die("can't open file of bad blocks"); | ||
689 | } | ||
690 | while (!feof(listfile)) { | 687 | while (!feof(listfile)) { |
691 | fscanf(listfile, "%ld\n", &blockno); | 688 | fscanf(listfile, "%ld\n", &blockno); |
692 | mark_zone(blockno); | 689 | mark_zone(blockno); |
diff --git a/util-linux/rdate.c b/util-linux/rdate.c index a3ea3a85b..ed7121a75 100644 --- a/util-linux/rdate.c +++ b/util-linux/rdate.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <netdb.h> | 28 | #include <netdb.h> |
29 | #include <stdio.h> | 29 | #include <stdio.h> |
30 | #include <getopt.h> | 30 | #include <getopt.h> |
31 | #include <string.h> | ||
32 | #include <time.h> | ||
31 | #include <stdlib.h> | 33 | #include <stdlib.h> |
32 | #include <unistd.h> | 34 | #include <unistd.h> |
33 | #include "busybox.h" | 35 | #include "busybox.h" |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 0613fa1e9..9deb13a28 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <mntent.h> | 26 | #include <mntent.h> |
27 | #include <dirent.h> | 27 | #include <dirent.h> |
28 | #include <errno.h> | 28 | #include <errno.h> |
29 | #include <string.h> | ||
29 | #include <stdlib.h> | 30 | #include <stdlib.h> |
30 | #include <sys/mount.h> | 31 | #include <sys/mount.h> |
31 | #include <sys/syscall.h> | 32 | #include <sys/syscall.h> |