Hello,
If in my resource manager, I register pathname prefix /dev/blob and I
have client that does open ("/dev/blob/a1"), how can I discover in my
resource manager what the actual path to open was or equivalently how can I
discover that open was passed “f1”?
Regards,
V.I. Galchin
“Vasili I. Galchin” <vngalchin@yahoo.com> wrote in message
news:a8vpi5$bgv$1@inn.qnx.com…
Hello,
If in my resource manager, I register pathname prefix /dev/blob and I
have client that does open ("/dev/blob/a1"), how can I discover in my
resource manager what the actual path to open was or equivalently how can
I
discover that open was passed “f1”?
Regards,
V.I. Galchin
Check _IO_OPEN message in sys/io_msg.h
Kernel sends you the following structure
struct _io_open {
msg_t type;
short int fd,
unit;
char version_cycle, /* eflag and zero2 invalid if /
/ this field is 0. /
/ It is zeroed by 4.10 proc /
eflag; / Extended flags (see above) */
nid_t nid;
mpid_t pid;
short int sflag,
oflag;
mode_t mode;
long zero2;
char path[1];
} ;
which has a variable size course of path[1] field. So when client opens
/dev/myprefix/file path you receive msg with path = “file”.
// wbr