Proposed new Unix POSIX_OPEN/POSIX_UNLINK calls.
Jeremy Allison
jra at samba.org
Thu Feb 8 00:19:02 GMT 2007
On Tue, Feb 06, 2007 at 04:54:48PM -0800, Jeremy Allison wrote:
> On Tue, Feb 06, 2007 at 04:26:03PM -0800, Jeremy Allison wrote:
> >
> > MKDIR call :
> >
> > To do the equivalent of a mkdir(path, mode) do the
> > following request :
> >
> > flags: 0
> > open flags: SMB_O_DIRECTORY|SMB_O_CREAT
> > mode_t: Requested mode_t for the new directory.
> >
> > The reply data block looks like the following
> >
> > Size Offset Value
> > -----------------------------------------------
> > 1 byte 0 oplock granted flags
> > (as returned by NTCreateX)
> > 1 byte 1 Must be Zero.
> > 2 bytes 2 Returned fnum.
> > [2 - N bytes] 4 Info level returned for the
> > opened file, or 0xFFFF if no
> > info level returned.
>
> Quick clarification, for the mkdir call
> varient of POSIX_OPEN the oplock granted
> flags and returned fnum are undefined (usually zero).
>
> For POSIX_OPEN and the mkdir varient the info
> level returned field is actually two fields :
>
> Size Offset Value
> -----------------------------------------------
> 2 bytes 4 Info level retured (or 0xFFFF)
> 0 - N bytes 6 Info level dependent data.
Quick clarification - Steve requested that the info level
returned be aligned to a 4 byte boundary - so the returned
values will look like :
: The reply data block looks like the following
Size Offset Value
-----------------------------------------------
1 byte 0 oplock granted flags
(as returned by NTCreateX)
1 byte 1 Must be Zero.
2 bytes 2 Returned fnum.
2 bytes 4 Info level returned for the
opened file, or 0xFFFF if no
info level returned.
2 bytes 6 Must be zero
N bytes 8 Optional level-dependent data.
More information about the samba-technical
mailing list