]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Convert static declarations of struct option to use new macros from
authorJim Meyering <jim@meyering.net>
Wed, 2 Dec 1992 18:51:53 +0000 (18:51 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 2 Dec 1992 18:51:53 +0000 (18:51 +0000)
getopt.h: no_argument, required_argument, and optional_argument.

login-utils/su.c

index bc33f1539c2d747faf3eee161c92bfc921a95710..ff2bfe5fce6b9cade0afa3b228b060a7050b992f 100644 (file)
@@ -164,11 +164,11 @@ static int change_environment;
 
 static struct option const longopts[] =
 {
-  {"command", 1, 0, 'c'},
-  {"fast", 0, &fast_startup, 1},
-  {"login", 0, &simulate_login, 1},
-  {"preserve-environment", 0, &change_environment, 0},
-  {"shell", 1, 0, 's'},
+  {"command", required_argument, 0, 'c'},
+  {"fast", no_argument, &fast_startup, 1},
+  {"login", no_argument, &simulate_login, 1},
+  {"preserve-environment", no_argument, &change_environment, 0},
+  {"shell", required_argument, 0, 's'},
   {0, 0, 0, 0}
 };