Quiet a few functions do have a return value of the type fsal_status_t
which is basically a struct of two integers.

In a non-error situation the second value is not of any interest and even
if an error occured, the second value is often set to zero.

Therefore, I suggest to turn the status variable (back) to a base-type 
(e.g. int)
and, if required, use a thread-local variable to indicate additional 
information.

Pretty much like errno, in fact, why not use errno.
The current second value of the struct (minor) seems to be used for
POSIX error codes already, which is pretty much for what errno is used.

This change would simplify the code as it would spare the effort of 
always building
the struct fsal_status_t including the handling to figure out if an 
error occured (FSAL_IS_ERROR).

Comments ?

Cheers Swen


------------------------------------------------------------------------------
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to