1: /*
   2:  * badsect
   3:  *
   4:  * Badsect takes a list of file-system relative sector numbers
   5:  * and makes files containing the blocks of which these sectors are a part.
   6:  * It can be used to contain sectors which have problems if these sectors
   7:  * are not part of the bad file for the pack (see bad144).  For instance,
   8:  * this program can be used if the driver for the file system in question
   9:  * does not support bad block forwarding.
  10:  */
  11: #include <sys/param.h>
  12: 
  13: long    atol();
  14: 
  15: main(argc, argv)
  16:     int argc;
  17:     char **argv;
  18: {
  19:     char nambuf[32];
  20:     int errs = 0;
  21: 
  22:     --argc, argv++;
  23:     while (argc > 0) {
  24:         if (mknod(*argv, 0, (u_short)(atol(*argv) / CLSIZE)))
  25:             perror("mknod"), errs++;
  26:         argc--, argv++;
  27:     }
  28:     exit(errs);
  29: }

Defined functions

main defined in line 15; never used
Last modified: 1983-03-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 649
Valid CSS Valid XHTML 1.0 Strict