summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2011-12-23 05:12:34 +0100
committerKay Sievers <kay.sievers@vrfy.org>2011-12-23 05:12:34 +0100
commit0e2856a268f3cb460b964b5088af2526a27c2423 (patch)
treeee803855e1a42042b730bba21630fe41c10e2e85
parent4a9460f15a8ff198d6a9c249bdd63572509e23bb (diff)
builtin: apply format string
-rw-r--r--udev/udev-rules.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index 0de44054b7..4226d0b4e0 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -2304,7 +2304,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
break;
}
case TK_M_IMPORT_BUILTIN: {
- const char *command = &rules->buf[cur->key.value_off];
+ char command[UTIL_PATH_SIZE];
if (udev_builtin_run_once(cur->key.builtin_cmd)) {
/* check if we ran already */
@@ -2322,10 +2322,13 @@ int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event
/* mark as ran */
event->builtin_run |= (1 << cur->key.builtin_cmd);
}
+
+ udev_event_apply_format(event, &rules->buf[cur->key.value_off], command, sizeof(command));
info(event->udev, "IMPORT builtin '%s' %s:%u\n",
udev_builtin_name(cur->key.builtin_cmd),
&rules->buf[rule->rule.filename_off],
rule->rule.filename_line);
+
if (udev_builtin_run(event->dev, cur->key.builtin_cmd, command, false) != 0) {
/* remember failure */
info(rules->udev, "IMPORT builtin '%s' returned non-zero\n",