From: Andreas Schneider Date: Mon, 14 Jan 2019 09:43:48 +0000 (+0100) Subject: s3:utils: Use C99 initializer for poptOption in smbcquotas X-Git-Tag: ldb-1.6.1~407 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5f084e9fd09ef2d0ff2c1e30ce5866f30c9e412;p=thirdparty%2Fsamba.git s3:utils: Use C99 initializer for poptOption in smbcquotas Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c index a4b1b8111a5..3f2fc7b37a1 100644 --- a/source3/utils/smbcquotas.c +++ b/source3/utils/smbcquotas.c @@ -585,22 +585,80 @@ int main(int argc, char *argv[]) poptContext pc; struct poptOption long_options[] = { POPT_AUTOHELP - { "user", 'u', POPT_ARG_STRING, NULL, 'u', "Show quotas for user", "user" }, - { "list", 'L', POPT_ARG_NONE, NULL, 'L', "List user quotas" }, - { "fs", 'F', POPT_ARG_NONE, NULL, 'F', "Show filesystem quotas" }, - { "set", 'S', POPT_ARG_STRING, NULL, 'S', "Set acls\n\ -SETSTRING:\n\ -UQLIM:// for user quotas\n\ -FSQLIM:/ for filesystem defaults\n\ -FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", "SETSTRING" }, - { "numeric", 'n', POPT_ARG_NONE, NULL, 'n', "Don't resolve sids or limits to names" }, - { "verbose", 'v', POPT_ARG_NONE, NULL, 'v', "be verbose" }, - { "test-args", 't', POPT_ARG_NONE, NULL, 't', "Test arguments"}, - {"max-protocol", 'm', POPT_ARG_STRING, NULL, 'm', - "Set the max protocol level", "LEVEL"}, + { + .longName = "user", + .shortName = 'u', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'u', + .descrip = "Show quotas for user", + .argDescrip = "USER", + }, + { + .longName = "list", + .shortName = 'L', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'L', + .descrip = "List user quotas", + }, + { + .longName = "fs", + .shortName = 'F', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'F', + .descrip = "Show filesystem quotas", + }, + { + .longName = "set", + .shortName = 'S', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'S', + .descrip = "Set acls\n" + "SETSTRING:\n" + "UQLIM:// for user quotas\n" + "FSQLIM:/ for filesystem defaults\n" + "FSQFLAGS:QUOTA_ENABLED/DENY_DISK/LOG_SOFTLIMIT/LOG_HARD_LIMIT", + .argDescrip = "SETSTRING", + }, + { + .longName = "numeric", + .shortName = 'n', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'n', + .descrip = "Don't resolve sids or limits to names", + }, + { + .longName = "verbose", + .shortName = 'v', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 'v', + .descrip = "be verbose", + }, + { + .longName = "test-args", + .shortName = 't', + .argInfo = POPT_ARG_NONE, + .arg = NULL, + .val = 't', + .descrip = "Test arguments" + }, + { + .longName = "max-protocol", + .shortName = 'm', + .argInfo = POPT_ARG_STRING, + .arg = NULL, + .val = 'm', + .descrip = "Set the max protocol level", + .argDescrip = "LEVEL" + }, POPT_COMMON_SAMBA POPT_COMMON_CREDENTIALS - { NULL } + POPT_TABLEEND }; smb_init_locale();