Teach libc5 what a sighandler_t is
[oweals/busybox.git] / mkfs_minix.c
index a2b6d8a6e5547dc196627bac05aee12a21b88a79..70374eae908248bfd62a3c42f74661cc29e4139c 100644 (file)
@@ -62,7 +62,6 @@
  *     removed getopt based parser and added a hand rolled one.
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <time.h>
 #include <unistd.h>
@@ -75,6 +74,7 @@
 #include <sys/ioctl.h>
 #include <sys/param.h>
 #include <mntent.h>
+#include "busybox.h"
 
 
 typedef unsigned char u8;
@@ -255,11 +255,6 @@ static inline int bit(char * a,unsigned int i)
 #define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1))
 #define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1))
 
-static __attribute__ ((noreturn)) void show_usage()
-{
-       usage(mkfs_minix_usage);
-}
-
 /*
  * Check to make certain that our new filesystem won't be created on
  * an already mounted partition.  Code adapted from mke2fs, Copyright
@@ -387,7 +382,7 @@ static void mark_good_blocks(void)
                mark_zone(good_blocks_table[blk]);
 }
 
-inline int next(int zone)
+static int next(int zone)
 {
        if (!zone)
                zone = FIRSTZONE - 1;
@@ -614,7 +609,7 @@ static void setup_tables(void)
  * Perform a test of a block; return the number of
  * blocks readable/writeable.
  */
-long do_check(char *buffer, int try, unsigned int current_block)
+static long do_check(char *buffer, int try, unsigned int current_block)
 {
        long got;
 
@@ -688,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);