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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user