display usage
| 431 | // display usage |
| 432 | // |
| 433 | static void |
| 434 | usage (int status) |
| 435 | { |
| 436 | if (status) |
| 437 | fprintf (stderr, "Try ``" PROGNAME_S " --help'' for more information.\n"); |
| 438 | else { |
| 439 | print_version(); |
| 440 | printf ("\n\ |
| 441 | Usage: " PROGNAME_S " [QUERY OPTION] [DEVICE|UUID]\n\ |
| 442 | " PROGNAME_S " [SEARCH OPTION]\n\ |
| 443 | \n\ |
| 444 | Query options:\n\ |
| 445 | \t--show-fstype display the filesytem type of the partition\n\ |
| 446 | \t--show-bsdname display the device name of the partition\n\ |
| 447 | \t--show-mountpoint display the mount point of the partition\n\ |
| 448 | \t--show-volumename display the volume name of the partition\n\ |
| 449 | \t--show-uuid display the UUID of the partition\n\ |
| 450 | \t--show-blocksize display the prefer blocksize of the partition\n\ |
| 451 | \t--show-partitionscheme display the partition scheme of a disk\n\ |
| 452 | \t--show-contenttype display the content type of the device\n\ |
| 453 | \t--show-pbrtype display the filesystem type from the PBR of the device\n\ |
| 454 | \t--show-wholedisk display the whole disk of the device\n\ |
| 455 | \t--dump dump properties of the partition\n\ |
| 456 | \n\ |
| 457 | Search options: \n\ |
| 458 | \t--search-uuid UUID search a partition with the specific UUID\n\ |
| 459 | \n\ |
| 460 | Other options:\n\ |
| 461 | \t-h, --help display this message and exit\n\ |
| 462 | \t-V, --version print version information and exit\n\ |
| 463 | \t-v, --verbose print verbose messages\n\ |
| 464 | \n\ |
| 465 | example: " PROGNAME_S " --show-fstype disk0s4\n\ |
| 466 | " PROGNAME_S " --show-bsdname 6A9017D9-2B9E-4786-B0A5-A75BD2264239\n\ |
| 467 | " PROGNAME_S " --show-blocksize disk0s4\n\ |
| 468 | " PROGNAME_S " --search-uuid 2C97F84A-F488-4917-A312-5D64BAE5BCFC\n"); |
| 469 | } |
| 470 | exit (status); |
| 471 | } |
| 472 | |
| 473 | |
| 474 | #pragma mark - |
no test coverage detected