mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 00:50:16 +01:00
Revert "cli: consider empty value as "*" for "Interface name: " prompt"
This reverts commit 3cb0bf6bc0.
It broke 'ifname' being required as a mandatory parameter as decided in
https://bugzilla.gnome.org/show_bug.cgi?id=698113
This commit is contained in:
parent
d79b56a7e9
commit
340542a2f2
1 changed files with 6 additions and 4 deletions
|
|
@ -4578,10 +4578,12 @@ do_connection_add (NmCli *nmc, int argc, char **argv)
|
|||
ifname_mandatory = FALSE;
|
||||
|
||||
if (!ifname && ifname_mandatory && nmc->ask)
|
||||
ifname = ifname_ask = nmc_get_user_input (_("Interface name [*]: "));
|
||||
if (!ifname && ifname_mandatory)
|
||||
ifname = ifname_ask = g_strdup ("*");
|
||||
|
||||
ifname = ifname_ask = nmc_get_user_input (_("Interface name: "));
|
||||
if (!ifname && ifname_mandatory) {
|
||||
g_string_printf (nmc->return_text, _("Error: 'ifname' argument is required."));
|
||||
nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
|
||||
goto error;
|
||||
}
|
||||
if (ifname) {
|
||||
if (!nm_utils_iface_valid_name (ifname) && strcmp (ifname, "*") != 0) {
|
||||
g_string_printf (nmc->return_text,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue