]> err.no Git - systemd/commitdiff
udevadm: add --version --help options to man page, hide them as commands
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 7 Sep 2008 12:48:33 +0000 (14:48 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 7 Sep 2008 12:48:33 +0000 (14:48 +0200)
extras/volume_id/vol_id.xml
udev/udevadm.c
udev/udevadm.xml
udev/udevd.xml

index fcf3a31fa519a4e220451d53caad4530d5f4d0ff..3ab0b05c8204a16daa7785985be6123f78c18148 100644 (file)
           <varlistentry>
             <term><option>--debug</option></term>
             <listitem>
-              <para>Print debug output to stderr.</para>
+              <para>Print debug messages to stderr.</para>
             </listitem>
           </varlistentry>
           <varlistentry>
index e4f24205467c2286730c6ae7dc5c44f714bee4d5..bfa704ef21754b9472c4bd297c9e7002a8821590 100644 (file)
@@ -63,7 +63,8 @@ static int help(struct udev *udev, int argc, char *argv[])
 
        printf("Usage: udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n");
        for (cmd = cmds; cmd->name != NULL; cmd++)
-               printf("  %-12s %s\n", cmd->name, cmd->help);
+               if (cmd->help != NULL)
+                       printf("  %-12s %s\n", cmd->name, cmd->help);
        printf("\n");
        return 0;
 }
@@ -103,12 +104,10 @@ static const struct command cmds[] = {
        {
                .name = "version",
                .cmd = version,
-               .help = "print the version number",
        },
        {
                .name = "help",
                .cmd = help,
-               .help = "print this help text",
        },
        {}
 };
@@ -210,7 +209,8 @@ int main(int argc, char *argv[])
                        }
                }
 
-       fprintf(stderr, "unknown command, try udevadm help\n\n");
+       fprintf(stderr, "missing or unknown command\n\n");
+       help(udev, argc, argv);
        rc = 2;
 out:
        sysfs_cleanup();
index 2e02c305d920ac766d3b18082eb849eaae3573b2..075890845b0cb80d75eed36b7d939eb83e1d9940 100644 (file)
 
       <refsynopsisdiv>
         <cmdsynopsis>
-          <command>udevadm info <optional>options</optional></command>
+          <command>udevadm</command>
+            <arg><option>--debug</option></arg>
+            <arg><option>--version</option></arg>
+            <arg><option>--help</option></arg>
+        </cmdsynopsis>
+        <cmdsynopsis>
+          <command>udevadm info <replaceable>options</replaceable></command>
         </cmdsynopsis>
         <cmdsynopsis>
           <command>udevadm trigger <optional>options</optional></command>
         <cmdsynopsis>
           <command>udevadm test <optional>options</optional> <replaceable>devpath</replaceable></command>
         </cmdsynopsis>
-        <cmdsynopsis>
-          <command>udevadm version</command>
-        </cmdsynopsis>
-        <cmdsynopsis>
-          <command>udevadm help</command>
-        </cmdsynopsis>
       </refsynopsisdiv>
 
       <refsect1><title>DESCRIPTION</title>
       </refsect1>
 
       <refsect1><title>OPTIONS</title>
+        <variablelist>
+          <varlistentry>
+            <term><option>--debug</option></term>
+            <listitem>
+              <para>Print debug messages to stderr.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><option>--version</option></term>
+            <listitem>
+              <para>Print version number.</para>
+            </listitem>
+          </varlistentry>
+          <varlistentry>
+            <term><option>--help</option></term>
+            <listitem>
+              <para>Print help text.</para>
+            </listitem>
+          </varlistentry>
+        </variablelist>
 
         <refsect2><title>udevadm info <replaceable>options</replaceable></title>
           <para>Queries the udev database for device information
             </varlistentry>
           </variablelist>
         </refsect2>
-
-        <refsect2><title>udevadm version</title>
-          <para>Print version number.</para>
-        </refsect2>
-
-        <refsect2><title>udevadm help</title>
-          <para>Print help text.</para>
-        </refsect2>
       </refsect1>
 
       <refsect1><title>AUTHOR</title>
index 8d22a0c14d1e8b0b50037b77866f62f8f95563b9..b5726b8b032c2521aa1db01423361c1a6726b23c 100644 (file)
@@ -61,7 +61,7 @@
           <varlistentry>
             <term><option>--debug</option></term>
             <listitem>
-              <para>Print log messages to stdout.</para>
+              <para>Print debug messages to stderr.</para>
             </listitem>
           </varlistentry>
           <varlistentry>
@@ -71,7 +71,7 @@
             </listitem>
           </varlistentry>
           <varlistentry>
-            <term><option>help</option></term>
+            <term><option>--help</option></term>
             <listitem>
               <para>Print help text.</para>
             </listitem>