简体   繁体   中英

creating attributes in sysfs

I am just trying to add a simple attribute to a device in the /sys filesystem. Seemed pretty straightforward but none of the helper methods mentioned here or here are exported from the kernel so I can't use them from a module? I must be missing something, can anyone provide some insight?

none of the helper methods mentioned here or here are exported from the kernel

They certainly are, grepping two out of the tree:

fs/sysfs/file.c:EXPORT_SYMBOL_GPL(sysfs_create_file); lib/kobject.c:EXPORT_SYMBOL(kobject_add);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM