Rommel Dongre <rdongre@pillardata.com> wrote:
Hi:
My understanding of the resource managers is that uid/gid information is
stored in an ‘attribute’ structure that exists for every resource/device;
while an ‘OCB’ structure exists for every fd, in that device.
The thing to remember is that a FILE on the disk is another
resource/device.
An OCB exists for each unique open() call made on the client
side – they correspond (mostly, barring dup()s) to file descriptors
in clients. They do not represent things on the device, rather they
can be thought of as a pointer to something on a device.
The OCB structure used by the resource manager library does have
a pointer to an attribute structure of the device/file that was
opened.
So, OCB will include per-open data, including things like current
read/write offset (seek location), open mode (O_RDONLY, O_RDWR),
etc.
The attribute structure will contain information about the file,
including things like: access, modification and status change
times, ownership (uid, gid), permission (-rw-rw-rw-, or 0666),
etc.
iofunc attribute structures are structures of information about
files and/or directories and/or devices.
ocbs are structures of information about client’s opens.
Yes, this can be a bit confusing.
-David
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.