Re: sysfs and inotify

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <greg@xxxxxxxxx> wrote:
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 but not working out.

See above :)

Use select to detect changes in sysfs files.  Or at the worse case, a
kobject CHANGE event, but be careful about using those, as they wake up
a lot of userspace when they are created.

Hope this helps,

greg k-h


Thanks,
--
~p~r~a~s~h~a~n~t~

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux