chiark / gitweb /
build argv[] for builtin commands
[elogind.git] / udev / udev-builtin.c
index 9f21727..f17b04f 100644 (file)
@@ -90,7 +90,13 @@ enum udev_builtin_cmd udev_builtin_lookup(const char *command)
 
 int udev_builtin_run(struct udev_device *dev, enum udev_builtin_cmd cmd, const char *command, bool test)
 {
-       return builtins[cmd]->cmd(dev, command, test);
+       char arg[UTIL_PATH_SIZE];
+       int argc;
+       char *argv[128];
+
+       util_strscpy(arg, sizeof(arg), command);
+       udev_build_argv(udev_device_get_udev(dev), arg, &argc, argv);
+       return builtins[cmd]->cmd(dev, argc, argv, test);
 }
 
 int udev_builtin_add_property(struct udev_device *dev, bool test, const char *key, const char *val, ...)