mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-19 01:45:00 +03:00
[PATCH] handle the subsytem if provided in udevtest.
this is needed to test the /etc/dev.d/ stuff properly.
This commit is contained in:
@@ -57,7 +57,7 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
{
|
{
|
||||||
char *devpath;
|
char *devpath;
|
||||||
char temp[NAME_SIZE];
|
char temp[NAME_SIZE];
|
||||||
char subsystem[] = "";
|
char *subsystem = "";
|
||||||
const int fake = 1;
|
const int fake = 1;
|
||||||
|
|
||||||
main_argv = argv;
|
main_argv = argv;
|
||||||
@@ -98,6 +98,9 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
/* initialize the naming deamon */
|
/* initialize the naming deamon */
|
||||||
namedev_init();
|
namedev_init();
|
||||||
|
|
||||||
|
if (argv[2] != NULL)
|
||||||
|
subsystem = argv[2];
|
||||||
|
|
||||||
/* simulate node creation with fake flag */
|
/* simulate node creation with fake flag */
|
||||||
udev_add_device(devpath, subsystem, fake);
|
udev_add_device(devpath, subsystem, fake);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user