X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udevstart.c;h=7e19c379a503ed8ff7f2885dd419ffd236f3157b;hp=eda6355b534e68e6b8cbc4502579255afbe9ab53;hb=9b28a52a0ac9b7993c932bbfe9d86dfc814be218;hpb=f27125f98f6487e881a957726da895aebd799f0d diff --git a/udevstart.c b/udevstart.c index eda6355b5..7e19c379a 100644 --- a/udevstart.c +++ b/udevstart.c @@ -33,6 +33,7 @@ #include #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) {