diff options
author | Dan Winship <danw@redhat.com> | 2015-01-08 08:02:09 -0500 |
---|---|---|
committer | Dan Winship <danw@redhat.com> | 2015-01-08 08:08:25 -0500 |
commit | cf1e5264670f428f819b018951808990d25ac3b8 (patch) | |
tree | cdab02202c938a26fec6033b88f2d9a6534cdf7b | |
parent | 14e7ee574fbb2a47537f4e51d4e9f22135464795 (diff) | |
download | NetworkManager-danw/devtimeout-rh1171917.tar.gz |
fixup! ifcfg-rh: handle DEVTIMEOUT property (rh #1171917)danw/devtimeout-rh1171917
-rw-r--r-- | src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c | 3 | ||||
-rw-r--r-- | src/settings/plugins/ifcfg-rh/reader.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c index 1e1381d300..8839fc7020 100644 --- a/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c +++ b/src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c @@ -166,6 +166,9 @@ nm_ifcfg_connection_check_devtimeout (NMIfcfgConnection *self) /* ONBOOT=yes, DEVICE and DEVTIMEOUT are set, but device is not present */ nm_settings_connection_set_ready (NM_SETTINGS_CONNECTION (self), FALSE); + nm_log_info (LOGD_SETTINGS, "Waiting %u seconds for %s to appear for connection '%s'", + devtimeout, ifname, nm_connection_get_id (NM_CONNECTION (self))); + priv->devtimeout_link_changed_handler = g_signal_connect (nm_platform_get (), NM_PLATFORM_SIGNAL_LINK_CHANGED, G_CALLBACK (link_changed), self); diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c index 46f5136cd6..97ac58aab1 100644 --- a/src/settings/plugins/ifcfg-rh/reader.c +++ b/src/settings/plugins/ifcfg-rh/reader.c @@ -4857,7 +4857,7 @@ devtimeout_from_file (const char *filename) { shvarFile *ifcfg; char *devtimeout_str; - int devtimeout; + guint devtimeout; g_return_val_if_fail (filename != NULL, NULL); @@ -4867,7 +4867,7 @@ devtimeout_from_file (const char *filename) devtimeout_str = svGetValue (ifcfg, "DEVTIMEOUT", FALSE); if (devtimeout_str) { - devtimeout = atoi (devtimeout_str); + devtimeout = nm_utils_ascii_str_to_int64 (devtimeout_str, 10, 0, G_MAXUINT, 0); g_free (devtimeout_str); } else devtimeout = 0; |