Applied patch from Gennady Feldman to use single-thread instead of forking.
[oweals/busybox.git] / mkfs_minix.c
index b666338dc1aee487381394f240c38f342d88bdfe..a83fa796166dd10c96bc92970fdf6132559b4f83 100644 (file)
@@ -609,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;
 
@@ -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);