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)
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.