diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-05-22 10:30:37 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-06-26 16:21:54 +0200 |
commit | fc53f54512d1fceda7a32c60f45dd5d305aafedd (patch) | |
tree | bbbde61136ca39ca0c2f1dbdb1f9571d1fc475b4 | |
parent | ff10d080796b26cd8f7e001fe2a498eb95249a13 (diff) | |
download | NetworkManager-fc53f54512d1fceda7a32c60f45dd5d305aafedd.tar.gz |
device: don't bother passing no_firmware uselessly
It's actually confusing in cases it's not handled. Besides,
nm_device_bring_up() is just happy about NULL argument.
-rw-r--r-- | src/devices/nm-device-bond.c | 13 | ||||
-rw-r--r-- | src/devices/nm-device-infiniband.c | 6 | ||||
-rw-r--r-- | src/devices/team/nm-device-team.c | 13 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index f59ec9ff22..ff7ecdbe23 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2011 - 2016 Red Hat, Inc. + * Copyright 2011 - 2018 Red Hat, Inc. */ #include "nm-default.h" @@ -363,7 +363,6 @@ static NMActStageReturn act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *out_failure_reason) { NMActStageReturn ret = NM_ACT_STAGE_RETURN_SUCCESS; - gboolean no_firmware = FALSE; ret = NM_DEVICE_CLASS (nm_device_bond_parent_class)->act_stage1_prepare (dev, out_failure_reason); if (ret != NM_ACT_STAGE_RETURN_SUCCESS) @@ -374,7 +373,7 @@ act_stage1_prepare (NMDevice *dev, NMDeviceStateReason *out_failure_reason) ret = apply_bonding_config (dev); if (ret != NM_ACT_STAGE_RETURN_FAILURE) ret = nm_device_hw_addr_set_cloned (dev, nm_device_get_applied_connection (dev), FALSE); - nm_device_bring_up (dev, TRUE, &no_firmware); + nm_device_bring_up (dev, TRUE, NULL); return ret; } @@ -386,7 +385,7 @@ enslave_slave (NMDevice *device, gboolean configure) { NMDeviceBond *self = NM_DEVICE_BOND (device); - gboolean success = TRUE, no_firmware = FALSE; + gboolean success = TRUE; const char *slave_iface = nm_device_get_ip_iface (slave); NMConnection *master_con; @@ -397,7 +396,7 @@ enslave_slave (NMDevice *device, success = nm_platform_link_enslave (nm_device_get_platform (device), nm_device_get_ip_ifindex (device), nm_device_get_ip_ifindex (slave)); - nm_device_bring_up (slave, TRUE, &no_firmware); + nm_device_bring_up (slave, TRUE, NULL); if (!success) return FALSE; @@ -434,7 +433,7 @@ release_slave (NMDevice *device, gboolean configure) { NMDeviceBond *self = NM_DEVICE_BOND (device); - gboolean success, no_firmware = FALSE; + gboolean success; gs_free char *address = NULL; if (configure) { @@ -463,7 +462,7 @@ release_slave (NMDevice *device, * IFF_UP), so we must bring it back up here to ensure carrier changes and * other state is noticed by the now-released slave. */ - if (!nm_device_bring_up (slave, TRUE, &no_firmware)) + if (!nm_device_bring_up (slave, TRUE, NULL)) _LOGW (LOGD_BOND, "released bond slave could not be brought up."); } else { _LOGI (LOGD_BOND, "bond slave %s was released", diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c index 99bcef0045..122ae25953 100644 --- a/src/devices/nm-device-infiniband.c +++ b/src/devices/nm-device-infiniband.c @@ -15,7 +15,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright 2011 Red Hat, Inc. + * Copyright 2011 - 2018 Red Hat, Inc. */ #include "nm-default.h" @@ -80,7 +80,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason) NMSettingInfiniband *s_infiniband; char ifname_verified[IFNAMSIZ]; const char *transport_mode; - gboolean ok, no_firmware = FALSE; + gboolean ok; ret = NM_DEVICE_CLASS (nm_device_infiniband_parent_class)->act_stage1_prepare (device, out_failure_reason); if (ret != NM_ACT_STAGE_RETURN_SUCCESS) @@ -104,7 +104,7 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason) /* With some drivers the interface must be down to set transport mode */ nm_device_take_down (device, TRUE); ok = nm_platform_sysctl_set (nm_device_get_platform (device), NMP_SYSCTL_PATHID_NETDIR (dirfd, ifname_verified, "mode"), transport_mode); - nm_device_bring_up (device, TRUE, &no_firmware); + nm_device_bring_up (device, TRUE, NULL); if (!ok) { NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED); diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index f83ba22b5d..bfca8ec186 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -1,8 +1,6 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* NetworkManager -- Network link manager * - * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us> - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,6 +14,9 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright (C) 2013 Jiri Pirko <jiri@resnulli.us> + * Copyright (C) 2018 Red Hat, Inc. */ #include "nm-default.h" @@ -703,7 +704,7 @@ enslave_slave (NMDevice *device, { NMDeviceTeam *self = NM_DEVICE_TEAM (device); NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (self); - gboolean success = TRUE, no_firmware = FALSE; + gboolean success = TRUE; const char *slave_iface = nm_device_get_ip_iface (slave); NMSettingTeamPort *s_team_port; @@ -738,7 +739,7 @@ enslave_slave (NMDevice *device, success = nm_platform_link_enslave (nm_device_get_platform (device), nm_device_get_ip_ifindex (device), nm_device_get_ip_ifindex (slave)); - nm_device_bring_up (slave, TRUE, &no_firmware); + nm_device_bring_up (slave, TRUE, NULL); if (!success) return FALSE; @@ -762,7 +763,7 @@ release_slave (NMDevice *device, { NMDeviceTeam *self = NM_DEVICE_TEAM (device); NMDeviceTeamPrivate *priv = NM_DEVICE_TEAM_GET_PRIVATE (self); - gboolean success, no_firmware = FALSE; + gboolean success; if (configure) { success = nm_platform_link_release (nm_device_get_platform (device), @@ -778,7 +779,7 @@ release_slave (NMDevice *device, * IFF_UP), so we must bring it back up here to ensure carrier changes and * other state is noticed by the now-released port. */ - if (!nm_device_bring_up (slave, TRUE, &no_firmware)) + if (!nm_device_bring_up (slave, TRUE, NULL)) _LOGW (LOGD_TEAM, "released team port %s could not be brought up", nm_device_get_ip_iface (slave)); |