On Fri, Feb 11, 2005 at 04:08:40PM +0100, Guillaume Thouvenin wrote: > +void kobject_fork(struct kobject *kobj, pid_t parent, pid_t child) > +{ > +#ifdef CONFIG_KOBJECT_UEVENT
No, provide two different functions. In a header file make it a static inline function that does nothing if this option is not selected, so as to make the code just go away, and the call is never made. > + char *kobj_path = NULL; > + char *action_string = NULL; > + char **envp = NULL; > + char ppid_string[FORK_BUFFER_SIZE]; > + char cpid_string[FORK_BUFFER_SIZE]; > + > + if (!uevent_sock) > + return; > + > + action_string = action_to_string(KOBJ_FORK); > + if (!action_string) > + return; > + > + kobj_path = kobject_get_path(kobj, GFP_KERNEL); > + if (!kobj_path) > + return; How is there a path for a kobject that is never registered with sysfs? I agree with Andrew, why are you using a kobject for this? Have you looked at the "connector" code that is in the -mm tree? That might be a better solution for this, and it will be going into the kernel tree after 2.6.11 is released. > +EXPORT_SYMBOL(kobject_fork); EXPORT_SYMBOL_GPL() for something like this please. thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/