about summary refs log tree commit diff
path: root/src/nm-initrd-generator/nmi-cmdline-reader.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-01-25 09:46:52 +0100
committerMichael Biebl <biebl@debian.org>2024-01-25 09:46:52 +0100
commitb6357ff41de179d0aa2e35a6d574e5749fe09002 (patch)
treeff038e98f4569fa3ba217266e6d288410ed84cd4 /src/nm-initrd-generator/nmi-cmdline-reader.c
parent535ecf92edd8ad054ae8102a224c3dd8f3acf967 (diff)
parent70e18d99b8e3e77bb37e218d7ac582130156f8ef (diff)
Update upstream source from tag 'upstream/1.45.90'
Update to upstream version '1.45.90'
with Debian dir d723a85d75b9a8958dee17b97673a3fd9a80e18c
Diffstat (limited to 'src/nm-initrd-generator/nmi-cmdline-reader.c')
-rw-r--r--src/nm-initrd-generator/nmi-cmdline-reader.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nm-initrd-generator/nmi-cmdline-reader.c b/src/nm-initrd-generator/nmi-cmdline-reader.c
index 68fe7004..7bb7e43e 100644
--- a/src/nm-initrd-generator/nmi-cmdline-reader.c
+++ b/src/nm-initrd-generator/nmi-cmdline-reader.c
@@ -486,12 +486,12 @@ _parse_ip_method(const char *kind)
     nm_strv_sort(strv, -1);
     nm_strv_cleanup_const(strv, TRUE, TRUE);
 
-    if (nm_strv_find_first(strv, -1, "auto") >= 0) {
+    if (nm_strv_contains(strv, -1, "auto")) {
         /* if "auto" is present, then "dhcp4", "dhcp6", and "local6" is implied. */
         _strv_remove(strv, "dhcp4");
         _strv_remove(strv, "dhcp6");
         _strv_remove(strv, "local6");
-    } else if (nm_strv_find_first(strv, -1, "dhcp6") >= 0) {
+    } else if (nm_strv_contains(strv, -1, "dhcp6")) {
         /* if "dhcp6" is present, then "local6" is implied. */
         _strv_remove(strv, "local6");
     }
@@ -924,9 +924,9 @@ reader_parse_master(Reader *reader, char *argument, const char *type_name, const
         connection = reader_get_connection(reader, slave, NULL, TRUE);
         s_con      = nm_connection_get_setting_connection(connection);
         g_object_set(s_con,
-                     NM_SETTING_CONNECTION_SLAVE_TYPE,
+                     NM_SETTING_CONNECTION_PORT_TYPE,
                      type_name,
-                     NM_SETTING_CONNECTION_MASTER,
+                     NM_SETTING_CONNECTION_CONTROLLER,
                      master,
                      NULL);
     } while (slaves && *slaves != '\0');
@@ -1435,7 +1435,7 @@ nmi_cmdline_reader_parse(const char        *etc_connections_dir,
         }
     }
 
-    reader->dhcp_timeout = NM_CLAMP(dhcp_timeout * dhcp_num_tries, 1, G_MAXINT32);
+    reader->dhcp_timeout = NM_CLAMP(dhcp_timeout * dhcp_num_tries, 1u, (guint32) G_MAXINT32);
 
     for (i = 0; argv[i]; i++) {
         gs_free char *argument_clone = NULL;