Whamcloud - gitweb
LU-8631 quota: better error message for 'lfs quota'
[fs/lustre-release.git] / lustre / utils / lfs.c
index 93442af..9ba0757 100644 (file)
@@ -3275,22 +3275,23 @@ ug_output:
         mnt = argv[optind];
 
         rc1 = llapi_quotactl(mnt, &qctl);
-        if (rc1 < 0) {
-                switch (rc1) {
-                case -ESRCH:
-                        fprintf(stderr, "%s quotas are not enabled.\n",
-                                qctl.qc_type == USRQUOTA ? "user" : "group");
-                        goto out;
-                case -EPERM:
-                        fprintf(stderr, "Permission denied.\n");
-                case -ENOENT:
-                        /* We already got a "No such file..." message. */
-                        goto out;
-                default:
-                        fprintf(stderr, "Unexpected quotactl error: %s\n",
-                                strerror(-rc1));
-                }
-        }
+       if (rc1 < 0) {
+               switch (rc1) {
+               case -ESRCH:
+                       fprintf(stderr, "%s quotas are not enabled.\n",
+                               qctl.qc_type == USRQUOTA ? "user" : "group");
+                       goto out;
+               case -EPERM:
+                       fprintf(stderr, "Permission denied.\n");
+               case -ENODEV:
+               case -ENOENT:
+                       /* We already got error message. */
+                       goto out;
+               default:
+                       fprintf(stderr, "Unexpected quotactl error: %s\n",
+                               strerror(-rc1));
+               }
+       }
 
        if (qctl.qc_cmd == LUSTRE_Q_GETQUOTA && !quiet)
                print_quota_title(name, &qctl, human_readable);