mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 09:50:09 +01:00
nmcli: fix "remove" command to really remove the property
When using the "remove" command on nmcli edit mode it will reset the value to the default when no property value is specified. If the property value is specified it will remove that specific property. Example: ``` nmcli> set ethernet.wake-on-lan phy nmcli> print ethernet.wake-on-lan 802-3-ethernet.wake-on-lan: phy, default nmcli> remove ethernet.wake-on-lan default nmcli> print ethernet.wake-on-lan 802-3-ethernet.wake-on-lan: phy nmcli> remove ethernet.wake-on-lan nmcli> print ethernet.wake-on-lan 802-3-ethernet.wake-on-lan: default ```
This commit is contained in:
parent
ec14d7df7c
commit
624372239e
1 changed files with 3 additions and 2 deletions
|
|
@ -8005,8 +8005,9 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty
|
|||
if (!nmc_setting_set_property(nmc->client,
|
||||
ss,
|
||||
prop_name,
|
||||
NM_META_ACCESSOR_MODIFIER_SET,
|
||||
NULL,
|
||||
cmd_arg_v ? NM_META_ACCESSOR_MODIFIER_DEL
|
||||
: NM_META_ACCESSOR_MODIFIER_SET,
|
||||
cmd_arg_v ? cmd_arg_v : NULL,
|
||||
&tmp_err)) {
|
||||
g_print(_("Error: failed to remove value of '%s': %s\n"),
|
||||
prop_name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue