aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-09 14:36:42 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-09 14:36:42 +0000
commiteba8ed71f08f334bc94ac8eeedcd998fcdd05897 (patch)
treec7a2f4adfb3418ff5d970a4f01fe87df38e04dc9 /util-linux
parent9ba5bce06f71e610db752489b4f97e2af56c2577 (diff)
downloadbusybox-eba8ed71f08f334bc94ac8eeedcd998fcdd05897.tar.gz
Patchs from Jeff Garzik <jgarzik@mandrakesoft.com> to cleanup
warnings with glibc 2.2 and use always use xfopen -Erik
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fbset.c3
-rw-r--r--util-linux/mkfs_minix.c5
-rw-r--r--util-linux/rdate.c2
-rw-r--r--util-linux/swaponoff.c1
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,
char buf[256];
char *p = buf;
- if ((f = fopen(fn, "r")) == NULL)
- perror_msg_and_die("readmode(fopen)");
+ f = xfopen(fn, "r");
while (!feof(f)) {
fgets(buf, sizeof(buf), f);
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;
FILE *listfile;
unsigned long blockno;
- listfile = fopen(filename, "r");
- if (listfile == (FILE *) NULL) {
- error_msg_and_die("can't open file of bad blocks");
- }
+ listfile = xfopen(filename, "r");
while (!feof(listfile)) {
fscanf(listfile, "%ld\n", &blockno);
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 @@
#include <netdb.h>
#include <stdio.h>
#include <getopt.h>
+#include <string.h>
+#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#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 @@
#include <mntent.h>
#include <dirent.h>
#include <errno.h>
+#include <string.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/syscall.h>