chiark / gitweb /
build-sys: add one more Makefile symlink
[elogind.git] / src / udev / udevadm.c
index a957e927088120c066c5007034e9aea5c87c8541..b86d8921f36a68c7a6865ce38cc2bab374d6a6c3 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <unistd.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <stddef.h>
-#include <string.h>
 #include <errno.h>
 #include <getopt.h>
 
@@ -60,11 +57,14 @@ static const struct udevadm_cmd *udevadm_cmds[] = {
 static int adm_help(struct udev *udev, int argc, char *argv[]) {
         unsigned int i;
 
-        fprintf(stderr, "Usage: udevadm [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n");
+        printf("%s [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n\n"
+               "Send control commands or test the device manager.\n\n"
+               "Commands:\n"
+               , program_invocation_short_name);
+
         for (i = 0; i < ELEMENTSOF(udevadm_cmds); i++)
                 if (udevadm_cmds[i]->help != NULL)
-                        printf("  %-12s %s\n", udevadm_cmds[i]->name, udevadm_cmds[i]->help);
-        fprintf(stderr, "\n");
+                        printf("  %-12s  %s\n", udevadm_cmds[i]->name, udevadm_cmds[i]->help);
         return 0;
 }