Commit 96339fa5 authored by Thomas Haller's avatar Thomas Haller

release: bump version to 1.21.1-dev after 1.20.0 release

After 1.20.0 is released, merge it back into master so that
1.20.0 is part of the history of master. That means,
  $ git log --first-parent master
will also traverse 1.20.0 and 1.20-rc*.

Also bump the micro version to 1.21.1-dev to indicate that this is
after 1.20.0 is out.
parents c438f01b e48089b0
......@@ -2933,7 +2933,8 @@ do_connection_up (NmCli *nmc, int argc, char **argv)
pwds = *argv;
}
else if (!nmc->complete) {
g_printerr (_("Unknown parameter: %s\n"), *argv);
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
return NMC_RESULT_ERROR_USER_INPUT;
}
next_arg (nmc, &argc, &argv, NULL);
......@@ -3135,7 +3136,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv)
}
if (arg_num == 0) {
g_string_printf (nmc->return_text, _("Error: No connection specified."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
}
......@@ -3153,7 +3154,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv)
arg_ptr++;
if (!arg_num) {
g_string_printf (nmc->return_text, _("Error: %s argument is missing."), selector);
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
}
......@@ -3174,7 +3175,7 @@ do_connection_down (NmCli *nmc, int argc, char **argv)
if (!found_active_cons) {
g_string_printf (nmc->return_text, _("Error: no active connection provided."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_NOT_FOUND);
return NMC_RESULT_ERROR_NOT_FOUND;
}
nm_assert (found_active_cons->len > 0);
......@@ -8220,7 +8221,7 @@ do_connection_edit (NmCli *nmc, int argc, char **argv)
else {
if (!nmc_parse_args (exp_args, TRUE, &argc, &argv, &error)) {
g_string_assign (nmc->return_text, error->message);
NMC_RETURN (nmc, error->code);
return error->code;
}
}
......@@ -8250,7 +8251,7 @@ do_connection_edit (NmCli *nmc, int argc, char **argv)
} else {
g_string_printf (nmc->return_text,
_("Error: only one of 'id', 'filename', uuid, or 'path' can be provided."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
}
......@@ -8264,7 +8265,7 @@ do_connection_edit (NmCli *nmc, int argc, char **argv)
if (!found_con) {
g_string_printf (nmc->return_text, _("Error: Unknown connection '%s'."), con);
NMC_RETURN (nmc, NMC_RESULT_ERROR_NOT_FOUND);
return NMC_RESULT_ERROR_NOT_FOUND;
}
/* Duplicate the connection and use that so that we need not
......@@ -8418,7 +8419,7 @@ do_connection_modify (NmCli *nmc,
connection = get_connection (nmc, &argc, &argv, NULL, NULL, NULL, &error);
if (!connection) {
g_string_printf (nmc->return_text, _("Error: %s."), error->message);
NMC_RETURN (nmc, error->code);
return error->code;
}
rc = nm_client_get_connection_by_uuid (nmc->client,
......@@ -8426,12 +8427,12 @@ do_connection_modify (NmCli *nmc,
if (!rc) {
g_string_printf (nmc->return_text, _("Error: Unknown connection '%s'."),
nm_connection_get_uuid (connection));
NMC_RETURN (nmc, NMC_RESULT_ERROR_NOT_FOUND);
return NMC_RESULT_ERROR_NOT_FOUND;
}
if (!nmc_read_connection_properties (nmc, NM_CONNECTION (rc), &argc, &argv, &error)) {
g_string_assign (nmc->return_text, error->message);
NMC_RETURN (nmc, error->code);
return error->code;
}
if (nmc->complete)
......@@ -8509,7 +8510,7 @@ do_connection_clone (NmCli *nmc, int argc, char **argv)
connection = get_connection (nmc, argc_ptr, argv_ptr, NULL, NULL, NULL, &error);
if (!connection) {
g_string_printf (nmc->return_text, _("Error: %s."), error->message);
NMC_RETURN (nmc, error->code);
return error->code;
}
if (nmc->complete)
......@@ -8522,12 +8523,12 @@ do_connection_clone (NmCli *nmc, int argc, char **argv)
_("New connection name: "));
} else {
g_string_printf (nmc->return_text, _("Error: <new name> argument is missing."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (next_arg (nmc->ask ? NULL : nmc, argc_ptr, argv_ptr, NULL) == 0) {
g_string_printf (nmc->return_text, _("Error: unknown extra argument: '%s'."), *argv);
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
new_connection = nm_simple_connection_new_clone (connection);
......@@ -8858,7 +8859,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
filename = nm_strstrip (filename_ask);
} else {
g_string_printf (nmc->return_text, _("Error: No arguments provided."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
}
......@@ -8874,7 +8875,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
argv++;
if (!argc) {
g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
if ( argc == 1
......@@ -8895,7 +8896,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
argv++;
if (!argc) {
g_string_printf (nmc->return_text, _("Error: %s argument is missing."), *(argv-1));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (argc == 1 && nmc->complete)
nmc->return_value = NMC_RESULT_COMPLETE_FILE;
......@@ -8904,8 +8905,8 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
else
g_printerr (_("Warning: 'file' already specified, ignoring extra one.\n"));
} else {
g_string_printf (nmc->return_text, _("Unknown parameter: %s"), *argv);
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
return NMC_RESULT_ERROR_USER_INPUT;
}
next_arg (nmc, &argc, &argv, NULL);
......@@ -8916,11 +8917,11 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
if (!type) {
g_string_printf (nmc->return_text, _("Error: 'type' argument is required."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (!filename) {
g_string_printf (nmc->return_text, _("Error: 'file' argument is required."));
NMC_RETURN (nmc, NMC_RESULT_ERROR_USER_INPUT);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (nm_streq (type, "wireguard"))
......@@ -8929,7 +8930,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
service_type = nm_vpn_plugin_info_list_find_service_type (nm_vpn_get_plugin_infos (), type);
if (!service_type) {
g_string_printf (nmc->return_text, _("Error: failed to find VPN plugin for %s."), type);
NMC_RETURN (nmc, NMC_RESULT_ERROR_UNKNOWN);
return NMC_RESULT_ERROR_UNKNOWN;
}
/* Import VPN configuration */
......@@ -8937,7 +8938,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
if (!plugin) {
g_string_printf (nmc->return_text, _("Error: failed to load VPN plugin: %s."),
error->message);
NMC_RETURN (nmc, NMC_RESULT_ERROR_UNKNOWN);
return NMC_RESULT_ERROR_UNKNOWN;
}
connection = nm_vpn_editor_plugin_import (plugin, filename, &error);
......@@ -8946,7 +8947,7 @@ do_connection_import (NmCli *nmc, int argc, char **argv)
if (!connection) {
g_string_printf (nmc->return_text, _("Error: failed to import '%s': %s."),
filename, error->message);
NMC_RETURN (nmc, NMC_RESULT_ERROR_UNKNOWN);
return NMC_RESULT_ERROR_UNKNOWN;
}
add_connection (nmc->client,
......
......@@ -1681,9 +1681,9 @@ do_devices_status (NmCli *nmc, int argc, char **argv)
if (nmc->complete)
return nmc->return_value;
while (argc > 0) {
g_printerr (_("Unknown parameter: %s\n"), *argv);
next_arg (nmc, &argc, &argv, NULL);
if (argc) {
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (!nmc->required_fields || strcasecmp (nmc->required_fields, "common") == 0)
......@@ -1836,20 +1836,52 @@ connected_state_cb (NMDevice *device, NMActiveConnection *active)
typedef struct {
NmCli *nmc;
NMDevice *device;
gboolean hotspot;
gboolean create;
char *specific_object;
bool hotspot:1;
bool create:1;
} AddAndActivateInfo;
static AddAndActivateInfo *
add_and_activate_info_new (NmCli *nmc,
NMDevice *device,
gboolean hotspot,
gboolean create,
const char *specific_object)
{
AddAndActivateInfo *info;
info = g_slice_new (AddAndActivateInfo);
*info = (AddAndActivateInfo) {
.nmc = nmc,
.device = g_object_ref (device),
.hotspot = hotspot,
.create = create,
.specific_object = g_strdup (specific_object),
};
return info;
}
static void
add_and_activate_info_free (AddAndActivateInfo *info)
{
g_object_unref (info->device);
g_free (info->specific_object);
nm_g_slice_free (info);
}
NM_AUTO_DEFINE_FCN0 (AddAndActivateInfo *, _nm_auto_free_add_and_activate_info, add_and_activate_info_free)
#define nm_auto_free_add_and_activate_info nm_auto (_nm_auto_free_add_and_activate_info)
static void
add_and_activate_cb (GObject *client,
GAsyncResult *result,
gpointer user_data)
{
AddAndActivateInfo *info = (AddAndActivateInfo *) user_data;
nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data;
NmCli *nmc = info->nmc;
NMDevice *device = info->device;
NMActiveConnection *active;
GError *error = NULL;
gs_unref_object NMActiveConnection *active = NULL;
gs_free_error GError *error = NULL;
if (info->create)
active = nm_client_add_and_activate_connection_finish (NM_CLIENT (client), result, &error);
......@@ -1857,37 +1889,36 @@ add_and_activate_cb (GObject *client,
active = nm_client_activate_connection_finish (NM_CLIENT (client), result, &error);
if (error) {
if (info->hotspot)
if (info->hotspot) {
g_string_printf (nmc->return_text, _("Error: Failed to setup a Wi-Fi hotspot: %s"),
error->message);
else if (info->create)
} else if (info->create) {
g_string_printf (nmc->return_text, _("Error: Failed to add/activate new connection: %s"),
error->message);
else
} else {
g_string_printf (nmc->return_text, _("Error: Failed to activate connection: %s"),
error->message);
g_error_free (error);
}
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
quit ();
} else {
if (nmc->nowait_flag) {
g_object_unref (active);
quit ();
} else {
g_object_ref (device);
g_signal_connect (device, "notify::state", G_CALLBACK (device_state_cb), active);
g_signal_connect (active, "notify::state", G_CALLBACK (active_state_cb), device);
return;
}
connected_state_cb (device, active);
if (nmc->nowait_flag) {
quit ();
return;
}
g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc); /* Exit if timeout expires */
g_signal_connect (device, "notify::state", G_CALLBACK (device_state_cb), active);
g_signal_connect (active, "notify::state", G_CALLBACK (active_state_cb), device);
if (nmc->nmc_config.print_output == NMC_PRINT_PRETTY)
progress_id = g_timeout_add (120, progress_cb, device);
}
}
connected_state_cb (g_object_ref (device),
g_steal_pointer (&active));
g_free (info);
g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc); /* Exit if timeout expires */
if (nmc->nmc_config.print_output == NMC_PRINT_PRETTY)
progress_id = g_timeout_add (120, progress_cb, device);
}
static void
......@@ -1916,9 +1947,9 @@ create_connect_connection_for_device (AddAndActivateInfo *info)
static void
connect_device_cb (GObject *client, GAsyncResult *result, gpointer user_data)
{
AddAndActivateInfo *info = (AddAndActivateInfo *) user_data;
nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data;
NmCli *nmc = info->nmc;
NMActiveConnection *active;
gs_unref_object NMActiveConnection *active = NULL;
GError *error = NULL;
const GPtrArray *devices;
NMDevice *device;
......@@ -1929,7 +1960,7 @@ connect_device_cb (GObject *client, GAsyncResult *result, gpointer user_data)
/* If no connection existed for the device, create one and activate it */
if (g_error_matches (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_CONNECTION)) {
info->create = TRUE;
create_connect_connection_for_device (info);
create_connect_connection_for_device (g_steal_pointer (&info));
return;
}
......@@ -1938,42 +1969,41 @@ connect_device_cb (GObject *client, GAsyncResult *result, gpointer user_data)
g_error_free (error);
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
quit ();
} else {
g_assert (active);
devices = nm_active_connection_get_devices (active);
if (devices->len == 0) {
g_string_printf (nmc->return_text, _("Error: Device activation failed: device was disconnected"));
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
g_object_unref (active);
quit ();
g_free (info);
return;
}
return;
}
device = g_ptr_array_index (devices, 0);
nm_assert (NM_IS_ACTIVE_CONNECTION (active));
if (nmc->nowait_flag) {
g_object_unref (active);
quit ();
} else {
if (nmc->secret_agent) {
NMRemoteConnection *connection = nm_active_connection_get_connection (active);
devices = nm_active_connection_get_devices (active);
if (devices->len == 0) {
g_string_printf (nmc->return_text, _("Error: Device activation failed: device was disconnected"));
nmc->return_value = NMC_RESULT_ERROR_CON_ACTIVATION;
quit ();
return;
}
nm_secret_agent_simple_enable (nmc->secret_agent,
nm_connection_get_path (NM_CONNECTION (connection)));
}
device = g_ptr_array_index (devices, 0);
g_object_ref (device);
g_signal_connect (device, "notify::state", G_CALLBACK (device_state_cb), active);
g_signal_connect (active, "notify::state", G_CALLBACK (active_state_cb), device);
if (nmc->nowait_flag) {
quit ();
return;
}
connected_state_cb (device, active);
if (nmc->secret_agent) {
NMRemoteConnection *connection = nm_active_connection_get_connection (active);
/* Start timer not to loop forever if "notify::state" signal is not issued */
g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc);
}
nm_secret_agent_simple_enable (nmc->secret_agent,
nm_connection_get_path (NM_CONNECTION (connection)));
}
g_free (info);
g_signal_connect (device, "notify::state", G_CALLBACK (device_state_cb), active);
g_signal_connect (active, "notify::state", G_CALLBACK (active_state_cb), device);
connected_state_cb (g_object_ref (device),
g_steal_pointer (&active));
/* Start timer not to loop forever if "notify::state" signal is not issued */
g_timeout_add_seconds (nmc->timeout, timeout_cb, nmc);
}
static NMCResultCode
......@@ -2018,10 +2048,7 @@ do_device_connect (NmCli *nmc, int argc, char **argv)
nmc);
}
info = g_malloc0 (sizeof (AddAndActivateInfo));
info->nmc = nmc;
info->device = device;
info->hotspot = FALSE;
info = add_and_activate_info_new (nmc, device, FALSE, FALSE, NULL);
nm_client_activate_connection_async (nmc->client,
NULL, /* let NM find a connection automatically */
......@@ -3027,8 +3054,10 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv)
if (nmc->complete)
return nmc->return_value;
if (argc)
g_printerr (_("Unknown parameter: %s\n"), *argv);
if (argc) {
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
return NMC_RESULT_ERROR_USER_INPUT;
}
if (rescan == NULL || strcmp (rescan, "auto") == 0) {
rescan_cutoff = NM_MAX (nm_utils_get_timestamp_msec () - 30 * NM_UTILS_MSEC_PER_SECOND, 0);
......@@ -3116,14 +3145,43 @@ do_device_wifi_list (NmCli *nmc, int argc, char **argv)
return nmc->return_value;
}
static void
activate_update2_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
NMRemoteConnection *remote_con = NM_REMOTE_CONNECTION (source_object);
nm_auto_free_add_and_activate_info AddAndActivateInfo *info = user_data;
NmCli *nmc = info->nmc;
gs_unref_variant GVariant *ret = NULL;
GError *error = NULL;
ret = nm_remote_connection_update2_finish (remote_con, res, &error);
if (!ret) {
g_string_printf (nmc->return_text, _("Error: %s."), error->message);
nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
g_error_free (error);
quit ();
return;
}
nm_client_activate_connection_async (nmc->client,
NM_CONNECTION (remote_con),
info->device,
info->specific_object,
NULL,
add_and_activate_cb,
g_steal_pointer (&info));
}
static NMCResultCode
do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
do_device_wifi_connect (NmCli *nmc, int argc, char **argv)
{
NMDevice *device = NULL;
NMAccessPoint *ap = NULL;
NM80211ApFlags ap_flags;
NM80211ApSecurityFlags ap_wpa_flags;
NM80211ApSecurityFlags ap_rsn_flags;
NMRemoteConnection *remote_con = NULL;
NMConnection *connection = NULL;
NMSettingConnection *s_con;
NMSettingWireless *s_wifi;
......@@ -3144,7 +3202,6 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
char *passwd_ask = NULL;
const GPtrArray *avail_cons;
gboolean name_match = FALSE;
gboolean existing_con = FALSE;
int i;
/* Set default timeout waiting for operation completion. */
......@@ -3291,7 +3348,9 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
goto finish;
}
} else if (!nmc->complete) {
g_printerr (_("Unknown parameter: %s\n"), *argv);
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
goto finish;
}
next_arg (nmc, &argc, &argv, NULL);
......@@ -3391,22 +3450,22 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
/* ap has been checked against bssid1, bssid2 and the ssid
* and now avail_con has been checked against ap.
*/
connection = NM_CONNECTION (avail_con);
existing_con = TRUE;
remote_con = avail_con;
connection = NM_CONNECTION (remote_con);
break;
}
}
if (name_match && !existing_con) {
if (name_match && !remote_con) {
g_string_printf (nmc->return_text, _("Error: Connection '%s' exists but properties don't match."), con_name);
nmc->return_value = NMC_RESULT_ERROR_NOT_FOUND;
goto finish;
}
if (!existing_con) {
if (!remote_con) {
/* If there are some connection data from user, create a connection and
* fill them into proper settings. */
if (con_name || private || bssid2_arr || password || hidden)
if (con_name || private || bssid2_arr || hidden)
connection = nm_simple_connection_new ();
if (con_name || private) {
......@@ -3518,24 +3577,21 @@ do_device_wifi_connect_network (NmCli *nmc, int argc, char **argv)
nmc->nowait_flag = (nmc->timeout == 0);
nmc->should_wait++;
info = g_malloc0 (sizeof (AddAndActivateInfo));
info->nmc = nmc;
info->device = device;
info->hotspot = FALSE;
info->create = !existing_con;
if (existing_con) {
nm_client_activate_connection_async (nmc->client,
connection,
device,
nm_object_get_path (NM_OBJECT (ap)),
NULL,
add_and_activate_cb,
info);
info = add_and_activate_info_new (nmc, device, FALSE, !remote_con, nm_object_get_path (NM_OBJECT (ap)));
if (remote_con) {
nm_remote_connection_update2 (remote_con,
nm_connection_to_dbus (connection, NM_CONNECTION_SERIALIZE_ALL),
NM_SETTINGS_UPDATE2_FLAG_BLOCK_AUTOCONNECT,
NULL,
NULL,
activate_update2_cb,
info);
} else {
nm_client_add_and_activate_connection_async (nmc->client,
connection,
device,
nm_object_get_path (NM_OBJECT (ap)),
info->device,
info->specific_object,
NULL,
add_and_activate_cb,
info);
......@@ -3784,7 +3840,7 @@ do_device_wifi_hotspot (NmCli *nmc, int argc, char **argv)
} else if (nmc_arg_is_option (*argv, "show-password")) {
show_password = TRUE;
} else {
g_string_printf (nmc->return_text, _("Error: Unknown parameter %s."), *argv);
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
return NMC_RESULT_ERROR_USER_INPUT;
}
......@@ -3888,11 +3944,7 @@ do_device_wifi_hotspot (NmCli *nmc, int argc, char **argv)
nmc->nowait_flag = (nmc->timeout == 0);
nmc->should_wait++;
info = g_malloc0 (sizeof (AddAndActivateInfo));
info->nmc = nmc;
info->device = device;
info->hotspot = TRUE;
info->create = TRUE;
info = add_and_activate_info_new (nmc, device, TRUE, TRUE, NULL);
nm_client_add_and_activate_connection_async (nmc->client,
connection,
......@@ -3966,8 +4018,11 @@ do_device_wifi_rescan (NmCli *nmc, int argc, char **argv)
goto finish;
}
g_ptr_array_add (ssids, *argv);
} else if (!nmc->complete)
g_printerr (_("Unknown parameter: %s\n"), *argv);
} else if (!nmc->complete) {
g_string_printf (nmc->return_text, _("Error: invalid extra argument '%s'."), *argv);
nmc->return_value = NMC_RESULT_ERROR_USER_INPUT;
goto finish;
}
next_arg (nmc, &argc, &argv, NULL);
}
......@@ -4013,11 +4068,11 @@ finish:
}
static NMCCommand device_wifi_cmds[] = {
{ "list", do_device_wifi_list, NULL, TRUE, TRUE },
{ "connect", do_device_wifi_connect_network, NULL, TRUE, TRUE },
{ "hotspot", do_device_wifi_hotspot, NULL, TRUE, TRUE },
{ "rescan", do_device_wifi_rescan, NULL, TRUE, TRUE },
{ NULL, do_device_wifi_list, NULL, TRUE, TRUE },
{ "list", do_device_wifi_list, NULL, TRUE, TRUE },
{ "connect", do_device_wifi_connect, NULL, TRUE, TRUE },
{ "hotspot", do_device_wifi_hotspot, NULL, TRUE, TRUE },
{ "rescan", do_device_wifi_rescan, NULL, TRUE, TRUE },
{ NULL, do_device_wifi_list, NULL, TRUE, TRUE },
};
static NMCResultCode
......
......@@ -149,11 +149,6 @@ typedef struct _NmCli {
char *palette_buffer; /* Buffer with sequences for terminal-colors.d(5)-based coloring. */
} NmCli;
#define NMC_RETURN(nmc, rvalue) \
G_STMT_START { \
return ((nmc)->return_value = (rvalue)); \
} G_STMT_END
extern NmCli nm_cli;