chiark / gitweb /
udevtest: print message before log output
authorKay Sievers <kay.sievers@vrfy.org>
Mon, 21 May 2007 05:02:04 +0000 (07:02 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 21 May 2007 05:02:04 +0000 (07:02 +0200)
udevtest.c

index 9868c9bcd3b4bb571023fda27a4f8b562c183d2d..91749a4eef38077b1ff70abddcf3ee0959b160e4 100644 (file)
@@ -149,6 +149,11 @@ int main(int argc, char *argv[], char *envp[])
                goto exit;
        }
 
                goto exit;
        }
 
+       printf("This program is for debugging only, it does not run any program,\n"
+              "specified by a RUN key. It may show incorrect results, because\n"
+              "some values may be different, or not available at a simulation run.\n"
+              "\n");
+
        sysfs_init();
        udev_rules_init(&rules, 0);
 
        sysfs_init();
        udev_rules_init(&rules, 0);
 
@@ -184,11 +189,6 @@ int main(int argc, char *argv[], char *envp[])
        setenv("ACTION", udev->action, 1);
        import_uevent_var(udev->dev->devpath);
 
        setenv("ACTION", udev->action, 1);
        import_uevent_var(udev->dev->devpath);
 
-       printf("This program is for debugging only, it does not run any program,\n"
-              "specified by a RUN key. It may show incorrect results, because\n"
-              "some values may be different, or not available at a simulation run.\n"
-              "\n");
-
        info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem);
        retval = udev_device_event(&rules, udev);
        if (retval == 0 && !udev->ignore_device && udev_run) {
        info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem);
        retval = udev_device_event(&rules, udev);
        if (retval == 0 && !udev->ignore_device && udev_run) {