chiark / gitweb /
make struct option arrays static const
[elogind.git] / udevmonitor.c
index 4c59a495dbc92c90fa77e45ff6a43401463646e0..35c3721f7633bd80ae66c8dddfdcd25289ef934b 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * udevmonitor.c
- *
  * Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
  *
  *     This program is free software; you can redistribute it and/or modify it
@@ -14,7 +12,7 @@
  * 
  *     You should have received a copy of the GNU General Public License along
  *     with this program; if not, write to the Free Software Foundation, Inc.,
- *     675 Mass Ave, Cambridge, MA 02139, USA.
+ *     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  */
 
@@ -118,22 +116,21 @@ int main(int argc, char *argv[])
 
        for (i = 1 ; i < argc; i++) {
                char *arg = argv[i];
-               if (strcmp(arg, "--env") == 0 || strcmp(arg, "-e") == 0) {
+               if (strcmp(arg, "--env") == 0 || strcmp(arg, "-e") == 0)
                        env = 1;
-               }
                else if (strcmp(arg, "--help") == 0  || strcmp(arg, "-h") == 0){
-                       printf("Usage: udevmonitor [--env]\n"
+                       printf("Usage: udevmonitor [--help] [--env]\n"
                                "  --env    print the whole event environment\n"
                                "  --help   print this help text\n\n");
                        exit(0);
                } else {
-                       fprintf(stderr, "unknown option\n\n");
+                       fprintf(stderr, "unrecognized option '%s'\n", arg);
                        exit(1);
                }
        }
 
        if (getuid() != 0) {
-               fprintf(stderr, "need to be root, exit\n\n");
+               fprintf(stderr, "root privileges required\n");
                exit(2);
        }