Sometimes I want to return an NTSTATUS from VFS functions that do not return an NTSTATUS ...

Richard Sharpe realrichardsharpe at gmail.com
Tue Aug 6 19:31:52 MDT 2013


Hi folks,

It sure would be nice if all of the VFS functions returned an NTSTATUS.

However, they don't.

On the other hand, errno values do not exceed 1000.

So, how about

   #define ERRNO_BREAK 1000
   #define EBADNETWORKNAME (ERRNO_BREAK + 0)
   #define EOBJECTNAMEINVALID (ERRNO_BREAK + 1)

And then, in the functions:

   errno = EBADNETWORKNAME;
   return -1;

and then in the function that translates UNIX errors to NT errors,
have an array for them.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list