#define UEVENT_HELPER_PATH_LEN 256 #define UEVENT_NUM_ENVP 64 /* number of env pointers */ #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */
#ifdef CONFIG_UEVENT_HELPER /* path to the userspace helper executed on an event */ externchar uevent_helper[]; #endif
/* counter to tag the uevent, read only except for the kobject core */ extern atomic64_t uevent_seqnum;
/* * The actions here must match the index to the string array * in lib/kobject_uevent.c * * Do not add new actions here without checking with the driver-core * maintainers. Action strings are not meant to express subsystem * or device specific properties. In most cases you want to send a * kobject_uevent_env(kobj, KOBJ_CHANGE, env) with additional event * specific variables added to the event environment.
*/ enum kobject_action {
KOBJ_ADD,
KOBJ_REMOVE,
KOBJ_CHANGE,
KOBJ_MOVE,
KOBJ_ONLINE,
KOBJ_OFFLINE,
KOBJ_BIND,
KOBJ_UNBIND,
};
/** * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. * * A kset defines a group of kobjects. They can be individually * different "types" but overall these kobjects all want to be grouped * together and operated on in the same manner. ksets are used to * define the attribute callbacks and other common events that happen to * a kobject. * * @list: the list of all kobjects for this kset * @list_lock: a lock for iterating over the kobjects * @kobj: the embedded kobject for this kset (recursion, isn't it fun...) * @uevent_ops: the set of uevent operations for this kset. These are * called whenever a kobject has something happen to it so that the kset * can add new environment variables, or filter out the uevents if so * desired.
*/ struct kset { struct list_head list;
spinlock_t list_lock; struct kobject kobj; conststruct kset_uevent_ops *uevent_ops;
} __randomize_layout;
/* The global /sys/kernel/ kobject for people to chain off of */ externstruct kobject *kernel_kobj; /* The global /sys/kernel/mm/ kobject for people to chain off of */ externstruct kobject *mm_kobj; /* The global /sys/hypervisor/ kobject for people to chain off of */ externstruct kobject *hypervisor_kobj; /* The global /sys/power/ kobject for people to chain off of */ externstruct kobject *power_kobj; /* The global /sys/firmware/ kobject for people to chain off of */ externstruct kobject *firmware_kobj;
int kobject_uevent(struct kobject *kobj, enum kobject_action action); int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, char *envp[]); int kobject_synth_uevent(struct kobject *kobj, constchar *buf, size_t count);
__printf(2, 3) int add_uevent_var(struct kobj_uevent_env *env, constchar *format, ...);
#endif/* _KOBJECT_H_ */
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.