Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/pdisk remove menu and command line options to list all ...



details:   https://anonhg.NetBSD.org/src/rev/52f3fb06e9e1
branches:  trunk
changeset: 536152:52f3fb06e9e1
user:      dbj <dbj%NetBSD.org@localhost>
date:      Mon Sep 09 13:07:36 2002 +0000

description:
remove menu and command line options to list all devices since they
only work on linux.  Update documentation to match.

diffstat:

 dist/pdisk/errors.c |   8 ++++++--
 dist/pdisk/pdisk.8  |  20 +++++++++++---------
 dist/pdisk/pdisk.c  |   9 +++++++++
 3 files changed, 26 insertions(+), 11 deletions(-)

diffs (92 lines):

diff -r 778a82e22ab7 -r 52f3fb06e9e1 dist/pdisk/errors.c
--- a/dist/pdisk/errors.c       Mon Sep 09 11:43:27 2002 +0000
+++ b/dist/pdisk/errors.c       Mon Sep 09 13:07:36 2002 +0000
@@ -96,10 +96,14 @@
 {
     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'},
diff -r 778a82e22ab7 -r 52f3fb06e9e1 dist/pdisk/pdisk.8
--- a/dist/pdisk/pdisk.8        Mon Sep 09 11:43:27 2002 +0000
+++ b/dist/pdisk/pdisk.8        Mon Sep 09 13:07:36 2002 +0000
@@ -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 @@
 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
diff -r 778a82e22ab7 -r 52f3fb06e9e1 dist/pdisk/pdisk.c
--- a/dist/pdisk/pdisk.c        Mon Sep 09 11:43:27 2002 +0000
+++ b/dist/pdisk/pdisk.c        Mon Sep 09 13:07:36 2002 +0000
@@ -190,7 +190,12 @@
                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 @@
            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 @@
        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");



Home | Main Index | Thread Index | Old Index