Re: sysfs and inotify

2009-04-14 Thread Prashant Bhole
I did not use udevadm monitor. Tried it, it shows udev events :) but i can not get those events in c program. poll() seems to be ok. Can I poll() on a directory? On Tue, Apr 14, 2009 at 11:01 AM, Greg KH g...@kroah.com wrote: On Tue, Apr 14, 2009 at 10:59:12AM +0530, Prashant Bhole wrote:

Re: sysfs and inotify

2009-04-14 Thread Greg KH
On Tue, Apr 14, 2009 at 02:34:25PM +0530, Prashant Bhole wrote: I did not use udevadm monitor. Tried it, it shows udev events :) but i can not get those events in c program. Use libudev, it works great for this. poll() seems to be ok. Can I poll() on a directory? Not on a sysfs directory,

Re: sysfs and inotify

2009-04-13 Thread Mulyadi Santosa
On Mon, Apr 13, 2009 at 6:26 PM, Prashant Bhole prashantsmailcen...@gmail.com wrote: Hi, Can I user inotify with sysfs? I have a kernel module which has exported its attributes in sysfs. Also, I have a user space program which needs to be notified about changes in attributes in sysfs. I

Re: sysfs and inotify

2009-04-13 Thread Greg KH
On Mon, Apr 13, 2009 at 04:56:19PM +0530, Prashant Bhole wrote: Hi, Can I user inotify with sysfs? No. I have a kernel module which has exported its attributes in sysfs. Also, I have a user space program which needs to be notified about changes in attributes in sysfs. I tried using inotify

Re: sysfs and inotify

2009-04-13 Thread Prashant Bhole
I tried dnotify. That too not working out. On Mon, Apr 13, 2009 at 10:42 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Mon, Apr 13, 2009 at 6:26 PM, Prashant Bhole prashantsmailcen...@gmail.com wrote: Hi, Can I user inotify with sysfs? I have a kernel module which has

Re: sysfs and inotify

2009-04-13 Thread Greg KH
On Tue, Apr 14, 2009 at 10:59:12AM +0530, Prashant Bhole wrote: Hi Grag, I have already tried kobject_uevent. I thought kobject_uevent will notify about the changes. But that didn't work. I think netlink is the only way to asynchronously communicate with user space. Is there any other way?

Re: sysfs and inotify

2009-04-13 Thread Prashant Bhole
Hi Grag, I have already tried kobject_uevent. I thought kobject_uevent will notify about the changes. But that didn't work. I think netlink is the only way to asynchronously communicate with user space. Is there any other way? On Mon, Apr 13, 2009 at 10:30 PM, Greg KH g...@kroah.com wrote: On