On Tue, Jun 23, 2020 at 05:30:38PM -0500, Eric Sandeen wrote: > On 6/22/20 8:13 AM, Bill O'Donnell wrote: > > @@ -350,8 +365,15 @@ quotaoff( > > return; > > } > > dir = mount->fs_name; > > - if (xfsquotactl(XFS_QUOTAOFF, dir, type, 0, (void *)&qflags) < 0) > > - perror("XFS_QUOTAOFF"); > > + if (xfsquotactl(XFS_QUOTAOFF, dir, type, 0, (void *)&qflags) < 0) { > > + if (errno == EEXIST) > > + fprintf(stderr, _("Quota already off.\n")); > > + else if (errno == EINVAL) > > + fprintf(stderr, > > + _("Can't disable when quotas are off.\n")); > > Is this the right message here? We get here from off_f(), which disables > enforcement and accounting, so I'm not sure "can't disable" makes sense > if "disable" means "disable enforcement" as it did in disable_enforcement()...? > > (IOWs, have can you provoke EINVAL? How? Sorry, this just kind of jumps out > at me because "can't disable" seems a little out of place in quotaoff() so > I want to double check.) You're right. It was a copy/paste from the disable case. You also have a good point in that I don't think EINVAL is ever provoked for the OFF case. I'll recheck it. Thanks- Bill > > Thanks, > -Eric >