Search code examples
linux-kerneldevice-driver

Device Driver proc entry ownership


I am a newbye in Device Driver and I am struggling with a /sys/class/net/atm0/statistics/* problem, I would like now which module is owner of that entry, there is a way to do that ?

Thanks in advance, pedr0


Solution

  • You're actually looking at sysfs, not procfs.

    In any case, working from a similar example on my system:

    # cd /sys/class/net/wlan0
    # cd ../
    # ls -lah
    lrwxrwxrwx  1 root root 0 May 24 19:19 wlan0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0
    # cd ../../devices/pci0000:00/0000:00:1c.1/0000:03:00.0/
    # ls -lah 
    lrwxrwxrwx 1 root root    0 May 24 19:19 driver -> ../../../../bus/pci/drivers/iwlwifi
    # cd driver
    # ls -lah
    lrwxrwxrwx  1 root root    0 May 30 19:17 module -> ../../../../module/iwlwifi
    

    On my system wlan0 is managed by the iwlwifi module.