Re: Sysfs

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

 



On Tue, Sep 27, 2005 at 12:35:53PM +0200, Kormos Matej wrote:
> Hello,
> As far as I know all network drivers are automatically shown in
> /sys/class/net;
> But what to do if I want my kobject which is in my char driver appears in
> /sys/class/net?

Why do you have a kobject in a char driver?  You should never have a
"raw" kobject in a driver.

> I am writing char driver which control some features on a switching device.
> My kobject appears in directly in /sys directory because I set kobject
> parent and kset to NULL.

No, do not do this.

> But I need to move it to the net directory. I have read the book Linux
> Device Drivers and searched web, but I have not found way how to acquire
> pointers to ksets created by another drivers and how to connect to net
> class. 

Why not just create a struct class_device and put that under the net
location?  If that struct class is exported.  If it isn't, please
contact the network developers with more details of exactly what you are
attempting to do.

thanks,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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