Whamcloud - gitweb
LU-13840 utils: --pool instead of -o with lfs setquota
[fs/lustre-release.git] / lustre / utils / lfs.c
index 5f3555f..99539b2 100644 (file)
@@ -6738,14 +6738,15 @@ int lfs_setquota_times(int argc, char **argv, struct if_quotactl *qctl)
        { .val = 'p',   .name = "projid",       .has_arg = no_argument },
        { .val = 't',   .name = "times",        .has_arg = no_argument },
        { .val = 'u',   .name = "user",         .has_arg = no_argument },
-       { .val = 'o',   .name = "pool",         .has_arg = required_argument },
+       { .val = LFS_POOL_OPT,
+                       .name = "pool",         .has_arg = required_argument },
        { .name = NULL } };
        int qtype;
 
        qctl->qc_cmd  = LUSTRE_Q_SETINFO;
        qctl->qc_type = ALLQUOTA;
 
-       while ((c = getopt_long(argc, argv, "b:gi:ptuo:",
+       while ((c = getopt_long(argc, argv, "b:gi:ptu",
                                long_opts, NULL)) != -1) {
                switch (c) {
                case 'u':
@@ -6796,7 +6797,7 @@ quota_type:
                        break;
                case 't': /* Yes, of course! */
                        break;
-               case 'o':
+               case LFS_POOL_OPT:
                        if (lfs_verify_poolarg(optarg))
                                return -1;
                        fprintf(stdout,
@@ -6860,7 +6861,8 @@ int lfs_setquota(int argc, char **argv)
        { .val = 'P',   .name = "default-prj",  .has_arg = no_argument },
        { .val = 'u',   .name = "user",         .has_arg = required_argument },
        { .val = 'U',   .name = "default-usr",  .has_arg = no_argument },
-       { .val = 'o',   .name = "pool",         .has_arg = required_argument },
+       { .val = LFS_POOL_OPT,
+                       .name = "pool",         .has_arg = required_argument },
        { .name = NULL } };
        unsigned int limit_mask = 0;
        bool use_default = false;
@@ -6886,7 +6888,7 @@ int lfs_setquota(int argc, char **argv)
                                   * isn't reinitialized from command line
                                   */
 
-       while ((c = getopt_long(argc, argv, "b:B:dg:Gi:I:p:Pu:Uo:",
+       while ((c = getopt_long(argc, argv, "b:B:dg:Gi:I:p:Pu:U",
                long_opts, NULL)) != -1) {
                switch (c) {
                case 'U':
@@ -6995,7 +6997,7 @@ quota_type_def:
                                        (unsigned long long)dqb->dqb_ihardlimit,
                                        progname);
                        break;
-               case 'o':
+               case LFS_POOL_OPT:
                        if (lfs_verify_poolarg(optarg)) {
                                rc = -1;
                                goto out;
@@ -7712,7 +7714,7 @@ static int lfs_quota(int argc, char **argv)
        bool show_default = false;
        int qtype;
        struct option long_opts[] = {
-       { .val = 1,     .name = "pool", .has_arg = required_argument },
+       { .val = LFS_POOL_OPT, .name = "pool", .has_arg = required_argument },
        { .name = NULL } };
 
        qctl = calloc(1, sizeof(*qctl) + LOV_MAXPOOLNAME + 1);
@@ -7788,7 +7790,7 @@ quota_type:
                case 'h':
                        human_readable = true;
                        break;
-               case 1:
+               case LFS_POOL_OPT:
                        if (lfs_verify_poolarg(optarg)) {
                                rc = -1;
                                goto out;