diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2004-09-04 04:11:26 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-09-04 04:11:26 +0200 |
commit | c4b61455ac041b17933550fc06d436005df4d589 (patch) | |
tree | 2cd08281cacf74689aad0e6921a00c08ffb4205b /lib | |
parent | fa6ee3dddc704b76bfa1730bcafe90e2d8fb964c (diff) | |
download | history-c4b61455ac041b17933550fc06d436005df4d589.tar.gz |
[PATCH] export of SEQNUM to userspace (creates /sys/kernel)
o /sys/kernel/hotplug_seqnum exports the current number
o lib/kobject.c's sequence_num is renamed to hotplug_seqnum and
exported by include/linux/kobject.h
o the source file ksysfs.c in kernel/ creates on init the
sybsystem "/sys/kernel/" in sysfs
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/kobject.c b/lib/kobject.c index a971b8e55e6b75..bb3069c7d8a492 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -122,7 +122,7 @@ char * kobject_get_path(struct kset *kset, struct kobject *kobj, int gfp_mask) #define BUFFER_SIZE 1024 /* should be enough memory for the env */ #define NUM_ENVP 32 /* number of env pointers */ -static unsigned long sequence_num; +unsigned long hotplug_seqnum; static spinlock_t sequence_lock = SPIN_LOCK_UNLOCKED; static void kset_hotplug(const char *action, struct kset *kset, @@ -178,7 +178,7 @@ static void kset_hotplug(const char *action, struct kset *kset, scratch += sprintf(scratch, "ACTION=%s", action) + 1; spin_lock(&sequence_lock); - seq = sequence_num++; + seq = hotplug_seqnum++; spin_unlock(&sequence_lock); envp [i++] = scratch; |