home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / C / C-FDC / TSTATI.C < prev    next >
Text File  |  1985-05-27  |  533b  |  26 lines

  1. #include <stdio.h>
  2. #include "fdc.h"
  3.  
  4. main(argc, argv)
  5. int argc;
  6. char **argv;
  7. {
  8.     extern int errno;
  9.     int drive;
  10.     struct ati *sp, *getati();
  11.     if(argc == 2)
  12.         drive = tolower(*argv[1]) - ('a' - 1);
  13.     else
  14.         drive = 0;
  15.     printf("getting information about drive #%d\n", drive);
  16.  
  17.     sp = getati(drive);
  18.     printf("media descriptor = %x\n", sp->media_type & 0xff );
  19.     printf("sector/allocation unit = %d\n", sp->sector_au);
  20.     printf("allocation units = %u\n", sp->au);
  21.     printf("sector size = %d\n", sp->sector_type);
  22.  
  23. }
  24.  
  25.     
  26.