mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 01:50:08 +01:00
core: fix wrong device state change on failure in NMDeviceEthernet
Due to a bug, when dcb fails it would change the device state
to NM_DEVICE_STATE_UNKNOWN (zero), instead of NM_DEVICE_STATE_FAILED.
clang warns:
make[4]: Entering directory `./NetworkManager/src'
CC nm-device-ethernet.lo
devices/nm-device-ethernet.c:1237:30: error: implicit conversion from enumeration type 'enum NMActStageReturn' to different enumeration type 'NMDeviceState' [-Werror,-Wenum-conversion]
NM_ACT_STAGE_RETURN_FAILURE,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
devices/nm-device-ethernet.c:1261:30: error: implicit conversion from enumeration type 'enum NMActStageReturn' to different enumeration type 'NMDeviceState' [-Werror,-Wenum-conversion]
NM_ACT_STAGE_RETURN_FAILURE,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
a2a36d8450
commit
657ea51008
1 changed files with 2 additions and 2 deletions
|
|
@ -1234,7 +1234,7 @@ dcb_state (NMDevice *device, gboolean timeout)
|
|||
if (!dcb_enable (device)) {
|
||||
dcb_carrier_cleanup (device);
|
||||
nm_device_state_changed (device,
|
||||
NM_ACT_STAGE_RETURN_FAILURE,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED);
|
||||
}
|
||||
}
|
||||
|
|
@ -1258,7 +1258,7 @@ dcb_state (NMDevice *device, gboolean timeout)
|
|||
if (!dcb_configure (device)) {
|
||||
dcb_carrier_cleanup (device);
|
||||
nm_device_state_changed (device,
|
||||
NM_ACT_STAGE_RETURN_FAILURE,
|
||||
NM_DEVICE_STATE_FAILED,
|
||||
NM_DEVICE_STATE_REASON_DCB_FCOE_FAILED);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue