home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / filesy~1 / mfsdefrg.zoo / misc.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-10-18  |  1.0 KB  |  46 lines

  1. /*
  2.  * misc.c - miscellaneous functions for the Linux file system degragmenter.
  3.  * misc.c,v 1.7 1993/01/07 14:48:50 linux Exp
  4.  *
  5.  * Copyright (C) 1992, 1993 Stephen Tweedie (sct@dcs.ed.ac.uk)
  6.  * 
  7.  * This file may be redistributed under the terms of the GNU General
  8.  * Public License.
  9.  *
  10.  */
  11.  
  12.  
  13. #include <stdlib.h>
  14. #include <stdio.h>
  15. #include <unistd.h>
  16.  
  17. #define MISC_C
  18. #include "defrag.h"
  19.  
  20. volatile void fatal_error (const char * fmt_string)
  21. {
  22.     fflush (stdout);
  23.     fprintf (stderr, fmt_string, program_name, device_name);
  24.     exit (1);
  25. }
  26.  
  27. volatile void usage()
  28. {
  29.     fflush (stdout);
  30.     fprintf (stderr, 
  31.          "Usage: %s [-V"
  32. #ifndef NODEBUG
  33.          "d"
  34. #endif
  35.          "rsv] [-p pool_size] /dev/name\n", 
  36.          program_name);
  37.     fprintf (stderr, "  -V : print full version information\n");
  38. #ifndef NODEBUG
  39.     fprintf (stderr, "  -d : debugging mode\n");
  40. #endif
  41.     fprintf (stderr, "  -r : read_only (testing) mode (implies -s)\n");
  42.     fprintf (stderr, "  -s : show summary information\n");
  43.     fprintf (stderr, "  -v : verbose (-vv is even more so)\n");
  44.     exit (1);
  45. }
  46.