]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/udev-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
7 #include "string-util.h"
10 int udev_parse_config(void) {
11 _cleanup_free_
char *val
= NULL
;
16 r
= parse_env_file(NULL
, "/etc/udev/udev.conf", NEWLINE
, "udev_log", &val
, NULL
);
17 if (r
== -ENOENT
|| !val
)
25 ((val
[0] == '"' && val
[n
-1] == '"') ||
26 (val
[0] == '\'' && val
[n
-1] == '\''))) {
32 /* we set the udev log level here explicitly, this is supposed
33 * to regulate the code in libudev/ and udev/. */
34 r
= log_set_max_level_from_string_realm(LOG_REALM_UDEV
, log
);
36 log_debug_errno(r
, "/etc/udev/udev.conf: failed to set udev log level '%s', ignoring: %m", log
);