From: Sami Kerola Date: Sat, 13 Dec 2014 16:58:37 +0000 (+0000) Subject: lslogins: fix short options X-Git-Tag: v2.26-rc1~112^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd4359bb0b41bdefc19f11c9c44faaf80561adc;p=thirdparty%2Futil-linux.git lslogins: fix short options Usage is promising -e is an option alias of --export, so make it work. And get rid of -x that was accepted, but not in use. Long only enum member OPT_VER was probably a development time idea, that never got to be used. Signed-off-by: Sami Kerola --- diff --git a/login-utils/lslogins.c b/login-utils/lslogins.c index 7fe6599d61..cacf83c1d7 100644 --- a/login-utils/lslogins.c +++ b/login-utils/lslogins.c @@ -1245,8 +1245,7 @@ int main(int argc, char *argv[]) /* long only options. */ enum { - OPT_VER = CHAR_MAX + 1, - OPT_WTMP, + OPT_WTMP = CHAR_MAX + 1, OPT_BTMP, OPT_NOTRUNC, OPT_NOHEAD, @@ -1304,7 +1303,7 @@ int main(int argc, char *argv[]) add_column(columns, ncolumns++, COL_UID); add_column(columns, ncolumns++, COL_USER); - while ((c = getopt_long(argc, argv, "acfGg:hLl:no:prsuVxzZ", + while ((c = getopt_long(argc, argv, "acefGg:hLl:no:prsuVzZ", longopts, NULL)) != -1) { err_exclusive_options(c, longopts, excl, excl_st);