[IPIP]: Make the fallback tunnel device per-net.
[deliverable/linux.git] / lib / kobject_uevent.c
index b021e67c42942ab70b5657fc1ebba4449d636f7a..9fb6b86cf6b15970ede185e8233a975dd4049d8a 100644 (file)
  */
 
 #include <linux/spinlock.h>
+#include <linux/string.h>
+#include <linux/kobject.h>
+#include <linux/module.h>
+
 #include <linux/socket.h>
 #include <linux/skbuff.h>
 #include <linux/netlink.h>
-#include <linux/string.h>
-#include <linux/kobject.h>
 #include <net/sock.h>
 
 
@@ -55,7 +57,7 @@ int kobject_action_type(const char *buf, size_t count,
        enum kobject_action action;
        int ret = -EINVAL;
 
-       if (count && buf[count-1] == '\n')
+       if (count && (buf[count-1] == '\n' || buf[count-1] == '\0'))
                count--;
 
        if (!count)
@@ -238,11 +240,12 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
                retval = add_uevent_var(env, "HOME=/");
                if (retval)
                        goto exit;
-               retval = add_uevent_var(env, "PATH=/sbin:/bin:/usr/sbin:/usr/bin");
+               retval = add_uevent_var(env,
+                                       "PATH=/sbin:/bin:/usr/sbin:/usr/bin");
                if (retval)
                        goto exit;
 
-               call_usermodehelper (argv[0], argv, env->envp, UMH_WAIT_EXEC);
+               call_usermodehelper(argv[0], argv, env->envp, UMH_WAIT_EXEC);
        }
 
 exit:
@@ -250,7 +253,6 @@ exit:
        kfree(env);
        return retval;
 }
-
 EXPORT_SYMBOL_GPL(kobject_uevent_env);
 
 /**
@@ -266,7 +268,6 @@ int kobject_uevent(struct kobject *kobj, enum kobject_action action)
 {
        return kobject_uevent_env(kobj, action, NULL);
 }
-
 EXPORT_SYMBOL_GPL(kobject_uevent);
 
 /**
This page took 0.03565 seconds and 5 git commands to generate.