summaryrefslogtreecommitdiff
path: root/udevstart.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-04-01 00:59:58 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:13 -0700
commit9b28a52a0ac9b7993c932bbfe9d86dfc814be218 (patch)
tree804f4ed19ff4849415b074771c42e5fec7142b14 /udevstart.c
parentbbbe503ec1a5623a5a8abd003f46fdd8c3581054 (diff)
[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 'udevstart.c')
-rw-r--r--udevstart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/udevstart.c b/udevstart.c
index eda6355b53..7e19c379a5 100644
--- a/udevstart.c
+++ b/udevstart.c
@@ -33,6 +33,7 @@
#include <unistd.h>
#include "logging.h"
+#include "udev_lib.h"
#ifdef LOG
@@ -61,8 +62,8 @@ static void udev_exec(const char *path, const char* subsystem)
char nosleep[] = "UDEV_NO_SLEEP=1";
char *env[] = { action, devpath, nosleep, NULL };
- snprintf(devpath, MAX_PATHLEN, "DEVPATH=%s", path);
- devpath[MAX_PATHLEN-1] = '\0';
+ strcpy(action, "DEVPATH=%s");
+ strfieldcat(action, path);
pid = fork();
switch (pid) {