test.c 275 B

1234567891011121314
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <disk.h>
  4. char *src[] = { "part", "disk", "guess" };
  5. void
  6. main(int argc, char **argv)
  7. {
  8. Disk *disk;
  9. assert(argc == 2);
  10. disk = opendisk(argv[1], 0, 0);
  11. print("%d %d %d from %s\n", disk->c, disk->h, disk->s, src[disk->chssrc]);
  12. }