poptContext pc;
struct poptOption long_options[] = {
POPT_AUTOHELP
- {"processes", 'p', POPT_ARG_NONE, NULL, 'p', "Show processes only" },
- {"verbose", 'v', POPT_ARG_NONE, NULL, 'v', "Be verbose" },
- {"locks", 'L', POPT_ARG_NONE, NULL, 'L', "Show locks only" },
- {"shares", 'S', POPT_ARG_NONE, NULL, 'S', "Show shares only" },
- {"notify", 'N', POPT_ARG_NONE, NULL, 'N', "Show notifies" },
- {"user", 'u', POPT_ARG_STRING, &username, 'u', "Switch to user" },
- {"brief", 'b', POPT_ARG_NONE, NULL, 'b', "Be brief" },
- {"profile", 'P', POPT_ARG_NONE, NULL, 'P', "Do profiling" },
- {"profile-rates", 'R', POPT_ARG_NONE, NULL, 'R', "Show call rates" },
- {"byterange", 'B', POPT_ARG_NONE, NULL, 'B', "Include byte range locks"},
- {"numeric", 'n', POPT_ARG_NONE, NULL, 'n', "Numeric uid/gid"},
- {"fast", 'f', POPT_ARG_NONE, NULL, 'f', "Skip checks if processes still exist"},
+ {
+ .longName = "processes",
+ .shortName = 'p',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'p',
+ .descrip = "Show processes only",
+ },
+ {
+ .longName = "verbose",
+ .shortName = 'v',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'v',
+ .descrip = "Be verbose",
+ },
+ {
+ .longName = "locks",
+ .shortName = 'L',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'L',
+ .descrip = "Show locks only",
+ },
+ {
+ .longName = "shares",
+ .shortName = 'S',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'S',
+ .descrip = "Show shares only",
+ },
+ {
+ .longName = "notify",
+ .shortName = 'N',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'N',
+ .descrip = "Show notifies",
+ },
+ {
+ .longName = "user",
+ .shortName = 'u',
+ .argInfo = POPT_ARG_STRING,
+ .arg = &username,
+ .val = 'u',
+ .descrip = "Switch to user",
+ },
+ {
+ .longName = "brief",
+ .shortName = 'b',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'b',
+ .descrip = "Be brief",
+ },
+ {
+ .longName = "profile",
+ .shortName = 'P',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'P',
+ .descrip = "Do profiling",
+ },
+ {
+ .longName = "profile-rates",
+ .shortName = 'R',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'R',
+ .descrip = "Show call rates",
+ },
+ {
+ .longName = "byterange",
+ .shortName = 'B',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'B',
+ .descrip = "Include byte range locks"
+ },
+ {
+ .longName = "numeric",
+ .shortName = 'n',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'n',
+ .descrip = "Numeric uid/gid"
+ },
+ {
+ .longName = "fast",
+ .shortName = 'f',
+ .argInfo = POPT_ARG_NONE,
+ .arg = NULL,
+ .val = 'f',
+ .descrip = "Skip checks if processes still exist"
+ },
POPT_COMMON_SAMBA
POPT_TABLEEND
};