query: Change internal result computation
While looking at the query library, I realized that while we have five field statuses, making this a 5-dimensional space, four of them are shrunk to a single possible value (None). Hence it should be possible to convert this into a single value space plus extra 4 special constants. This patch implements this, making (IMHO) the return value of normal functions much simpler: you simply return the desired value, instead of (QRFS_NORMAL, value); for the special results, you simply return _FS_UNAVAIL, instead of (QRFS_UNAVAIL, None). This I believe does simplify the code. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
Loading
Please register or sign in to comment