chiark / gitweb /
Remove src/tty-ask-password-agent
[elogind.git] / src / udev / collect / collect.c
index 16675fbe0e0feab01eadfd16dfc6a3535407f8f8..6cf41c67bb322f6adef1ddb2190b52340fd6e99f 100644 (file)
  */
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <stddef.h>
-#include <unistd.h>
-#include <signal.h>
-#include <fcntl.h>
 #include <errno.h>
-#include <string.h>
 #include <getopt.h>
-#include <sys/types.h>
-#include <sys/stat.h>
 
-#include "libudev.h"
 #include "libudev-private.h"
 #include "macro.h"
 
@@ -68,15 +60,19 @@ noreturn static void sig_alrm(int signo)
 
 static void usage(void)
 {
-        printf("usage: collect [--add|--remove] [--debug] <checkpoint> <id> <idlist>\n"
-               "\n"
+        printf("%s [options] <checkpoint> <id> <idlist>\n\n"
+               "Collect variables across events.\n\n"
+               "  -h --help        Print this message\n"
+               "  -a --add         Add ID <id> to the list <idlist>\n"
+               "  -r --remove      Remove ID <id> from the list <idlist>\n"
+               "  -d --debug       Debug to stderr\n\n"
                "  Adds ID <id> to the list governed by <checkpoint>.\n"
                "  <id> must be part of the list <idlist>.\n"
                "  If all IDs given by <idlist> are listed (ie collect has been\n"
                "  invoked for each ID in <idlist>) collect returns 0, the\n"
                "  number of missing IDs otherwise.\n"
-               "  On error a negative number is returned.\n"
-               "\n");
+               "  On error a negative number is returned.\n\n"
+               , program_invocation_short_name);
 }
 
 /*