If a file system has set quota limits but the user does not occupy any space or inodes, quota tool reports "none":
# /tmp/linuxquota-git/quota -u test Disk quotas for user test (uid 500): none
and that looks like no quota limits are set, but that's not true as can verified in the verbose mode:
# /tmp/linuxquota-git/quota -u test -v Disk quotas for user test (uid 500): Filesystem blocks quota limit grace files quota limit grace /dev/loop0 0 10 20 0 0 0 /dev/loop1 3 0 0 1 0 0
and thats confusing. (At least for me and some other users I talked to.)
Attached patch tracks whether there are indeed no quota limits and changes the message to be clear why no details were printed in the non-verbose mode.
Another question, not addressed with the patch, is why actually the non-verbose mode exist. I would assume reporting the details for every file system with quota limits set regardless of used space very helpfull. Is there any reason for that? I could not find the reason as the git history starts after introducing the -v option.
Anonymous
This behavior (including -v option) has been there since I've started taking care of quota tools (i.e. before 1999) and I guess it was originally present in the BSD tools quota-tools have been derived from. I guess the rationale for this behavior is to skip reporting devices user isn't using to make output shorter but I admit the behavior was a bit confusing to me as well and I almost always use -v when testing quota changes. I just never dared to change the behavior due to backward compatibility concerns.
Looking at it now, I don't think there are too many scripts parsing quota(1) output without -v so I guess your change is fine. Maybe we could keep the original "none" output for the "no quota limits set" case and just add a new "no limited resources used"? Because in my experience that's what is causing most of the confusion...
No problem. See the attached patch that replaces the original one.
Thanks. Patch applied!