mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-22 04:30:37 +01:00
cli: move global "loop" variable to nmcli.h header
This commit is contained in:
parent
03307e3dd6
commit
c5c48d4f5f
5 changed files with 5 additions and 20 deletions
|
|
@ -36,8 +36,6 @@
|
|||
|
||||
#include "utils.h"
|
||||
|
||||
extern GMainLoop *loop;
|
||||
|
||||
const NmcMetaGenericInfo *const nmc_fields_ip4_config[] = {
|
||||
NMC_META_GENERIC ("GROUP"), /* 0 */
|
||||
NMC_META_GENERIC ("ADDRESS"), /* 1 */
|
||||
|
|
@ -1170,8 +1168,6 @@ nmc_parse_lldp_capabilities (guint value)
|
|||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
extern GMainLoop *loop;
|
||||
|
||||
static void
|
||||
command_done (GObject *object, GAsyncResult *res, gpointer user_data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -227,9 +227,6 @@ const NmcMetaGenericInfo *const nmc_fields_con_active_details_groups[] = {
|
|||
#define CON_SHOW_DETAIL_GROUP_PROFILE "profile"
|
||||
#define CON_SHOW_DETAIL_GROUP_ACTIVE "active"
|
||||
|
||||
/* glib main loop variable - defined in nmcli.c */
|
||||
extern GMainLoop *loop;
|
||||
|
||||
static guint progress_id = 0; /* ID of event source for displaying progress */
|
||||
|
||||
/* for readline TAB completion in editor */
|
||||
|
|
@ -571,7 +568,6 @@ nmc_setting_new_for_name (const char *name)
|
|||
return setting;
|
||||
}
|
||||
|
||||
/* quit main loop */
|
||||
static void
|
||||
quit (void)
|
||||
{
|
||||
|
|
@ -581,7 +577,7 @@ quit (void)
|
|||
nmc_terminal_erase_line ();
|
||||
}
|
||||
|
||||
g_main_loop_quit (loop); /* quit main loop */
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
|
|
|||
|
|
@ -245,9 +245,6 @@ const NmcMetaGenericInfo *const nmc_fields_dev_lldp_list[] = {
|
|||
#define NMC_FIELDS_DEV_LLDP_LIST_COMMON "DEVICE,CHASSIS-ID,PORT-ID,PORT-DESCRIPTION,SYSTEM-NAME,SYSTEM-DESCRIPTION," \
|
||||
"SYSTEM-CAPABILITIES"
|
||||
|
||||
/* glib main loop variable - defined in nmcli.c */
|
||||
extern GMainLoop *loop;
|
||||
|
||||
static guint progress_id = 0; /* ID of event source for displaying progress */
|
||||
|
||||
static void
|
||||
|
|
@ -450,7 +447,6 @@ usage_device_lldp (void)
|
|||
"used to list neighbors for a particular interface.\n\n"));
|
||||
}
|
||||
|
||||
/* quit main loop */
|
||||
static void
|
||||
quit (void)
|
||||
{
|
||||
|
|
@ -459,7 +455,7 @@ quit (void)
|
|||
nmc_terminal_erase_line ();
|
||||
}
|
||||
|
||||
g_main_loop_quit (loop); /* quit main loop */
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
|
|
@ -364,10 +364,6 @@ static const NmcMetaGenericInfo *const metagen_general_logging[_NMC_GENERIC_INFO
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* glib main loop variable - defined in nmcli.c */
|
||||
extern GMainLoop *loop;
|
||||
|
||||
|
||||
static void
|
||||
usage_general (void)
|
||||
{
|
||||
|
|
@ -507,11 +503,10 @@ usage_monitor (void)
|
|||
"Prints a line whenever a change occurs in NetworkManager\n\n"));
|
||||
}
|
||||
|
||||
/* quit main loop */
|
||||
static void
|
||||
quit (void)
|
||||
{
|
||||
g_main_loop_quit (loop); /* quit main loop */
|
||||
g_main_loop_quit (loop);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -155,6 +155,8 @@ extern NmCli nm_cli;
|
|||
#define NMCLI_ERROR (nmcli_error_quark ())
|
||||
GQuark nmcli_error_quark (void);
|
||||
|
||||
extern GMainLoop *loop;
|
||||
|
||||
gboolean nmc_seen_sigint (void);
|
||||
void nmc_clear_sigint (void);
|
||||
void nmc_set_sigquit_internal (void);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue