xfsprogs: libxcmd: allow 0 as a wildcard fs_table entry type selector
In libxcmd a table is used to represent filesystems and directories
that could be subject to quota operations. A cursor mechanism is
used to search that table, and it includes a flag that indicates
whether the type of entry desired represents a directory (for project
quotas) or a mount point (otherwise). It also allows a search for
either type.
There is only call to fs_cursor_initialise() where both mount points
and project paths are requested--all others just requested one or
the other.
Change it so when searching fs_table (in fs_table_lookup() and
fs_cursor_next_entry()), a zero "flags" value is interpreted as a
wildcard, matching either type of entry.
Also add some commentary explaining the use of 0 as a wildcard, and
simplify fs_cursor_next_entry() a bit in the process.
Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>