diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-02-23 03:16:44 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-05-07 22:49:12 -0400 |
commit | b237a168dfb981bdd9bcfe7a1002be7eb1b8da72 (patch) | |
tree | abdb4c6bcce49c3d000c895550ea9a2e23682111 /src/udev/udevadm.c | |
parent | 5c72049f91b82c8edb64840343df41329f81c7f6 (diff) | |
download | systemd-b237a168dfb981bdd9bcfe7a1002be7eb1b8da72.tar.gz |
Rip out setting of the log level from udev_new and put it in a new function
This function is internal to systemd code, so external users of libudev
will not see those log messages. I think this is better. If we want to
allow that, the function could be put in libudev and exported.
v2: check that the string is more than one char before stripping quotes
Diffstat (limited to 'src/udev/udevadm.c')
-rw-r--r-- | src/udev/udevadm.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c index 492b2f4c25..befc3bad7b 100644 --- a/src/udev/udevadm.c +++ b/src/udev/udevadm.c @@ -23,6 +23,7 @@ #include "selinux-util.h" #include "string-util.h" #include "udev.h" +#include "udev-util.h" static int adm_version(struct udev *udev, int argc, char *argv[]) { printf("%s\n", PACKAGE_VERSION); @@ -87,14 +88,16 @@ int main(int argc, char *argv[]) { unsigned int i; int rc = 1, c; - udev = udev_new(); - if (udev == NULL) - goto out; - + udev_parse_config(); log_parse_environment(); log_open(); + mac_selinux_init(); + udev = udev_new(); + if (udev == NULL) + goto out; + while ((c = getopt_long(argc, argv, "+dhV", options, NULL)) >= 0) switch (c) { |