]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: suppress multiple log message about interface naming scheme from workers
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 10 Apr 2022 14:55:06 +0000 (23:55 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 11 Apr 2022 10:59:04 +0000 (19:59 +0900)
src/udev/udev-builtin-net_id.c

index cede28a81b9c0055f080d6f1da761f9d7791e330..f2ea2a7cd51390bc3906c8880a826a9ce5974e9d 100644 (file)
@@ -1138,8 +1138,15 @@ static int builtin_net_id(sd_device *dev, sd_netlink **rtnl, int argc, char *arg
         return 0;
 }
 
+static int builtin_net_id_init(void) {
+        /* Load naming scheme here to suppress log messages in workers. */
+        naming_scheme();
+        return 0;
+}
+
 const UdevBuiltin udev_builtin_net_id = {
         .name = "net_id",
         .cmd = builtin_net_id,
+        .init = builtin_net_id_init,
         .help = "Network device properties",
 };