Re: Get USB Device Class Type and Mount point

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

 



On Mon, Feb 13, 2012 at 05:44:56PM +0530, Abhijit Pawar wrote:
> The  reason I went for kernel module is to get the device add
> notification. However once I get the notification, I can have
> netlink socket pass the device data to my user space application.

Like others pointed out, use libudev for this, that's the only way you
can properly do it.

> Here the tricky part is I can get the device info, but not able to
> figure out how can I get the mount path from this device.

Within the kernel you can not.  Think of namespaces, and all that fun
stuff, it will not work properly within the kernel.

Again, if you are using an encrypted filesystem, just use what Linux
provides for this today.  Is there something there that does not meet
your needs?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[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