remove menu and command line options to list all devices since they

only work on linux.  Update documentation to match.
This commit is contained in:
dbj 2002-09-09 13:07:36 +00:00
parent 538e2d34af
commit a587e4b1e8
3 changed files with 26 additions and 11 deletions

8
dist/pdisk/errors.c vendored
View File

@ -96,10 +96,14 @@ do_help()
{
printf("\t%s [-h|--help]\n", program_name);
printf("\t%s [-v|--version]\n", program_name);
printf("\t%s [-l|--list [name ...]]\n", program_name);
#ifdef __linux__
printf("\t%s [-l|--list [name]] [...]\n", program_name);
#else
printf("\t%s [-l|--list] name [...]\n", program_name);
#endif
printf("\t%s [-r|--readonly] name ...\n", program_name);
printf("\t%s [-i|--interactive]\n", program_name);
printf("\t%s name ...\n", program_name);
printf("\t%s name [...]\n", program_name);
/*
{"debug", no_argument, 0, 'd'},
{"abbr", no_argument, 0, 'a'},

20
dist/pdisk/pdisk.8 vendored
View File

@ -1,4 +1,4 @@
.\" $NetBSD: pdisk.8,v 1.6 2002/09/09 11:43:27 dbj Exp $
.\" $NetBSD: pdisk.8,v 1.7 2002/09/09 13:07:36 dbj Exp $
.Dd August 19, 2002
.Os
.Dt PDISK 8
@ -57,14 +57,16 @@ Causes
to go into an interactive mode similar to the MacOS version of the program.
.It Fl l
.It Fl -list Ar device
If no
.Ar device
argument is given,
.Nm
tries to list partition tables for all available hard drives.
Otherwise,
.Nm
lists the partition tables for the specified
.\"If no
.\".Ar device
.\"argument is given,
.\".Nm
.\"tries to list partition tables for all available hard drives.
.\"Otherwise,
.\".Nm
.\"lists
List
the partition tables for the specified
.Ar devices .
.It Fl L
.It Fl -logical

9
dist/pdisk/pdisk.c vendored
View File

@ -190,7 +190,12 @@ main(int argc, char **argv)
dump(argv[name_index++]);
}
} else {
#ifdef __linux__
list_all_disks();
#else
usage("no device argument");
do_help();
#endif
}
} else if (name_index < argc) {
while (name_index < argc) {
@ -247,7 +252,9 @@ interact()
printf(" h print help\n");
printf(" v print the version number and release date\n");
printf(" l list device's map\n");
#ifdef __linux__
printf(" L list all devices' maps\n");
#endif
printf(" e edit device's map\n");
printf(" E (edit map with specified block size)\n");
printf(" r toggle readonly flag\n");
@ -269,9 +276,11 @@ interact()
case 'v':
printf("version " VERSION " (" RELEASE_DATE ")\n");
break;
#ifdef __linux__
case 'L':
list_all_disks();
break;
#endif
case 'l':
if (get_string_argument("Name of device: ", &name, 1) == 0) {
bad_input("Bad name");