summaryrefslogtreecommitdiff
path: root/udevtest.c
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-04-01 21:46:07 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:14 -0700
commitce4256bdc5012b9b63abca392bc0ead7ad70d20a (patch)
treea9796167114d0c5fe5674d111973dfc5fd762771 /udevtest.c
parentd5853b48fb098ca63af813ae74cd6af3a9400d01 (diff)
[PATCH] handle the subsytem if provided in udevtest.
this is needed to test the /etc/dev.d/ stuff properly.
Diffstat (limited to 'udevtest.c')
-rw-r--r--udevtest.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/udevtest.c b/udevtest.c
index 67ae9cc98f..36f223e1e5 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);