From ce4256bdc5012b9b63abca392bc0ead7ad70d20a Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Thu, 1 Apr 2004 21:46:07 -0800 Subject: [PATCH] [PATCH] handle the subsytem if provided in udevtest. this is needed to test the /etc/dev.d/ stuff properly. --- udevtest.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udevtest.c b/udevtest.c index 67ae9cc9..36f223e1 100644 --- a/udevtest.c +++ b/udevtest.c @@ -57,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; @@ -98,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); -- 2.39.5