summaryrefslogtreecommitdiffstats
path: root/udevd.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-04-01 10:59:58 +0200
committerGreg KH <gregkh@suse.de>2005-04-27 06:35:13 +0200
commit9b28a52a0ac9b7993c932bbfe9d86dfc814be218 (patch)
tree804f4ed19ff4849415b074771c42e5fec7142b14 /udevd.c
parent[PATCH] netdev - udevdb+dev.d changes (diff)
downloadsystemd-9b28a52a0ac9b7993c932bbfe9d86dfc814be218.tar.xz
systemd-9b28a52a0ac9b7993c932bbfe9d86dfc814be218.zip
[PATCH] DEVPATH for netdev
Here we change the DEVPATH for netdev's in the environment of the dev.d/ scripts to the name the device is renamed to. The original name doesn't exist in the kernel after rename.
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/udevd.c b/udevd.c
index 301625fd92..d464b9a196 100644
--- a/udevd.c
+++ b/udevd.c
@@ -139,8 +139,10 @@ static void udev_run(struct hotplug_msg *msg)
char devpath[DEVPATH_SIZE];
char *env[] = { action, devpath, NULL };
- snprintf(action, sizeof(action), "ACTION=%s", msg->action);
- snprintf(devpath, sizeof(devpath), "DEVPATH=%s", msg->devpath);
+ strcpy(action, "ACTION=");
+ strfieldcat(action, msg->action);
+ strcpy(devpath, "DEVPATH=");
+ strfieldcat(devpath, msg->devpath);
pid = fork();
switch (pid) {