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:
parent
538e2d34af
commit
a587e4b1e8
8
dist/pdisk/errors.c
vendored
8
dist/pdisk/errors.c
vendored
@ -96,10 +96,14 @@ do_help()
|
|||||||
{
|
{
|
||||||
printf("\t%s [-h|--help]\n", program_name);
|
printf("\t%s [-h|--help]\n", program_name);
|
||||||
printf("\t%s [-v|--version]\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 [-r|--readonly] name ...\n", program_name);
|
||||||
printf("\t%s [-i|--interactive]\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'},
|
{"debug", no_argument, 0, 'd'},
|
||||||
{"abbr", no_argument, 0, 'a'},
|
{"abbr", no_argument, 0, 'a'},
|
||||||
|
20
dist/pdisk/pdisk.8
vendored
20
dist/pdisk/pdisk.8
vendored
@ -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
|
.Dd August 19, 2002
|
||||||
.Os
|
.Os
|
||||||
.Dt PDISK 8
|
.Dt PDISK 8
|
||||||
@ -57,14 +57,16 @@ Causes
|
|||||||
to go into an interactive mode similar to the MacOS version of the program.
|
to go into an interactive mode similar to the MacOS version of the program.
|
||||||
.It Fl l
|
.It Fl l
|
||||||
.It Fl -list Ar device
|
.It Fl -list Ar device
|
||||||
If no
|
.\"If no
|
||||||
.Ar device
|
.\".Ar device
|
||||||
argument is given,
|
.\"argument is given,
|
||||||
.Nm
|
.\".Nm
|
||||||
tries to list partition tables for all available hard drives.
|
.\"tries to list partition tables for all available hard drives.
|
||||||
Otherwise,
|
.\"Otherwise,
|
||||||
.Nm
|
.\".Nm
|
||||||
lists the partition tables for the specified
|
.\"lists
|
||||||
|
List
|
||||||
|
the partition tables for the specified
|
||||||
.Ar devices .
|
.Ar devices .
|
||||||
.It Fl L
|
.It Fl L
|
||||||
.It Fl -logical
|
.It Fl -logical
|
||||||
|
9
dist/pdisk/pdisk.c
vendored
9
dist/pdisk/pdisk.c
vendored
@ -190,7 +190,12 @@ main(int argc, char **argv)
|
|||||||
dump(argv[name_index++]);
|
dump(argv[name_index++]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#ifdef __linux__
|
||||||
list_all_disks();
|
list_all_disks();
|
||||||
|
#else
|
||||||
|
usage("no device argument");
|
||||||
|
do_help();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else if (name_index < argc) {
|
} else if (name_index < argc) {
|
||||||
while (name_index < argc) {
|
while (name_index < argc) {
|
||||||
@ -247,7 +252,9 @@ interact()
|
|||||||
printf(" h print help\n");
|
printf(" h print help\n");
|
||||||
printf(" v print the version number and release date\n");
|
printf(" v print the version number and release date\n");
|
||||||
printf(" l list device's map\n");
|
printf(" l list device's map\n");
|
||||||
|
#ifdef __linux__
|
||||||
printf(" L list all devices' maps\n");
|
printf(" L list all devices' maps\n");
|
||||||
|
#endif
|
||||||
printf(" e edit device's map\n");
|
printf(" e edit device's map\n");
|
||||||
printf(" E (edit map with specified block size)\n");
|
printf(" E (edit map with specified block size)\n");
|
||||||
printf(" r toggle readonly flag\n");
|
printf(" r toggle readonly flag\n");
|
||||||
@ -269,9 +276,11 @@ interact()
|
|||||||
case 'v':
|
case 'v':
|
||||||
printf("version " VERSION " (" RELEASE_DATE ")\n");
|
printf("version " VERSION " (" RELEASE_DATE ")\n");
|
||||||
break;
|
break;
|
||||||
|
#ifdef __linux__
|
||||||
case 'L':
|
case 'L':
|
||||||
list_all_disks();
|
list_all_disks();
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case 'l':
|
case 'l':
|
||||||
if (get_string_argument("Name of device: ", &name, 1) == 0) {
|
if (get_string_argument("Name of device: ", &name, 1) == 0) {
|
||||||
bad_input("Bad name");
|
bad_input("Bad name");
|
||||||
|
Loading…
Reference in New Issue
Block a user