mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-10 03:30:19 +01:00
cli: don't support removing sriov vfs by index
The VFs already can be parsed as plain number (to indicate the
ifindex). We should not also support accepting the plain number
as index to be removed.
Fixes: a2f12994b7 ('cli: add support for configuring SR-IOV')
This commit is contained in:
parent
da5895951a
commit
65c8c19fa7
2 changed files with 1 additions and 4 deletions
|
|
@ -6112,8 +6112,6 @@ static const NMMetaPropertyInfo *const property_infos_SRIOV[] = {
|
|||
.clear_all_fcn = OBJLIST_CLEAR_ALL_FCN (NMSettingSriov, nm_setting_sriov_clear_vfs),
|
||||
.obj_to_str_fcn = _objlist_obj_to_str_fcn_sriov_vfs,
|
||||
.set_fcn = _objlist_set_fcn_sriov_vfs,
|
||||
/* FIXME: removing by index is ambigous and should maybe be prevented. */
|
||||
.remove_by_idx_fcn_u = OBJLIST_REMOVE_BY_IDX_FCN_U (NMSettingSriov, nm_setting_sriov_remove_vf),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2962,8 +2962,7 @@ nm_utils_sriov_vf_from_str (const char *str, GError **error)
|
|||
|
||||
detail = strchr (str, ' ');
|
||||
if (detail) {
|
||||
index_free = g_strndup (str, detail - str);
|
||||
str = index_free;
|
||||
str = nm_strndup_a (200, str, detail - str, &index_free);
|
||||
detail++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue