X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=udev%2Fudevadm.c;h=336d72370546307e1986ca098961bf3d18adcf41;hp=3d94215ba97d04524516eca820354304973f5262;hb=2d74bc75792bdd993e6298cf253541624001517c;hpb=bbfeee28fc00642a01bf3f9c24e6c0e942d4adf8 diff --git a/udev/udevadm.c b/udev/udevadm.c index 3d94215ba..336d72370 100644 --- a/udev/udevadm.c +++ b/udev/udevadm.c @@ -35,8 +35,11 @@ static void log_fn(struct udev *udev, int priority, fprintf(stderr, "%s: ", fn); vfprintf(stderr, format, args); } else { - if (priority <= LOG_ERR) - vfprintf(stderr, format, args); + va_list args2; + + va_copy(args2, args); + vfprintf(stderr, format, args2); + va_end(args2); vsyslog(priority, format, args); } } @@ -143,7 +146,7 @@ int main(int argc, char *argv[]) udev_set_log_fn(udev, log_fn); udev_selinux_init(udev); - while (1) { + for (;;) { int option; option = getopt_long(argc, argv, "+dhV", options, NULL); @@ -168,6 +171,8 @@ int main(int argc, char *argv[]) } command = argv[optind]; + info(udev, "runtime dir '%s'\n", udev_get_run_path(udev)); + if (command != NULL) for (i = 0; cmds[i].cmd != NULL; i++) { if (strcmp(cmds[i].name, command) == 0) {