Monitoring the Directory created in Resource manager


I want to implement the function to monitor the devices like /dev/io-net/eth …
My intention is to do a stat() on the device handle file in /dev/.
Hoewever, this is not possible with the devices that are created using the Resource Manager, let asume /dev/rm_dev/.
I have created a directory /dev/rm_dev in my resource manager, and there are several devices under this directory which are being created at run time.

Generally, the device entry for the /dev/rm_dev looks strange:
---------- 17039368 40960 4194304 556194687124242432 Jan 01 1970 rm_dev
(no “file” type, no permissions, strange numners compared to other devices:
crw-rw-rw- 1 root root 0, 1 Jan 01 13:00 eth)

Any idea how to monitor this directory!!

Thanks in advance,


The “strange data” means that you are not initializing the device attribute structure. What appears as the result of a stat on your resource manager is totally under your control.

I have added the function, iofunc_chmod_default and iofunc_stat_default to get the stat.
Is there any fucntion, which I need to provide explicitely!!

iofunc_attr_init() would be a good place to start, although you still might want tweak the individual members of the iofunc_attr_t.

I am already doing to set the attribute of the /dev/rm_dev directory.