X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udevtest.c;h=36f223e1e556b1099b14d49c53d8d83485d72593;hb=16ddbbe10a6484daf63596818a19890225388a71;hp=95b85dd8bed607170e690c8c8dd752e3a9aa60e0;hpb=8a0acf85f25d2fb4659aafbad7db2fe48a58307d;p=elogind.git diff --git a/udevtest.c b/udevtest.c index 95b85dd8b..36f223e1e 100644 --- a/udevtest.c +++ b/udevtest.c @@ -29,6 +29,7 @@ #include "libsysfs/sysfs/libsysfs.h" #include "udev.h" +#include "udev_lib.h" #include "udev_version.h" #include "logging.h" #include "namedev.h" @@ -56,7 +57,7 @@ int main(int argc, char *argv[], char *envp[]) { char *devpath; char temp[NAME_SIZE]; - char subsystem[] = ""; + char *subsystem = ""; const int fake = 1; main_argv = argv; @@ -97,6 +98,9 @@ int main(int argc, char *argv[], char *envp[]) /* initialize the naming deamon */ namedev_init(); + if (argv[2] != NULL) + subsystem = argv[2]; + /* simulate node creation with fake flag */ udev_add_device(devpath, subsystem, fake);