summaryrefslogtreecommitdiff
path: root/udev/udev-builtin.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-23 02:02:44 +0100
committerKay Sievers <kay.sievers@vrfy.org>2011-12-23 02:02:44 +0100
commite216e514cf0c3bc6352f43fa3a7ffad221200bca (patch)
tree0ebb4007064451265fc2a4b58ac7f82c6eb7011e /udev/udev-builtin.c
parentdb634679ad58b3205910c969ac5359b1d6f625ad (diff)
build argv[] for builtin commands
Diffstat (limited to 'udev/udev-builtin.c')
-rw-r--r--udev/udev-builtin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev/udev-builtin.c b/udev/udev-builtin.c
index 9f21727699..f17b04f67e 100644
--- a/udev/udev-builtin.c
+++ b/udev/udev-builtin.c
@@ -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, ...)