cli: declare external variable nm_cli in <nmcli.h> header
This commit is contained in:
@@ -1170,10 +1170,6 @@ nmc_set_in_readline (gboolean in_readline)
|
|||||||
pthread_mutex_unlock (&readline_mutex);
|
pthread_mutex_unlock (&readline_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Global variable defined in nmcli.c */
|
|
||||||
extern NmCli nm_cli;
|
|
||||||
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
nmc_readline_helper (const char *prompt)
|
nmc_readline_helper (const char *prompt)
|
||||||
{
|
{
|
||||||
|
@@ -261,9 +261,6 @@ typedef struct {
|
|||||||
} TabCompletionInfo;
|
} TabCompletionInfo;
|
||||||
static TabCompletionInfo nmc_tab_completion = {NULL, NULL, NULL, NULL};
|
static TabCompletionInfo nmc_tab_completion = {NULL, NULL, NULL, NULL};
|
||||||
|
|
||||||
/* Global variable defined in nmcli.c - used for TAB completion */
|
|
||||||
extern NmCli nm_cli;
|
|
||||||
|
|
||||||
static char *gen_connection_types (const char *text, int state);
|
static char *gen_connection_types (const char *text, int state);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -3572,9 +3572,6 @@ is_single_word (const char* line)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Global variable defined in nmcli.c */
|
|
||||||
extern NmCli nm_cli;
|
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
gen_func_ifnames (const char *text, int state)
|
gen_func_ifnames (const char *text, int state)
|
||||||
{
|
{
|
||||||
|
@@ -161,6 +161,8 @@ typedef struct _NmCli {
|
|||||||
NmcTermColor editor_prompt_color; /* Color of prompt in connection editor */
|
NmcTermColor editor_prompt_color; /* Color of prompt in connection editor */
|
||||||
} NmCli;
|
} NmCli;
|
||||||
|
|
||||||
|
extern NmCli nm_cli;
|
||||||
|
|
||||||
/* Error quark for GError domain */
|
/* Error quark for GError domain */
|
||||||
#define NMCLI_ERROR (nmcli_error_quark ())
|
#define NMCLI_ERROR (nmcli_error_quark ())
|
||||||
GQuark nmcli_error_quark (void);
|
GQuark nmcli_error_quark (void);
|
||||||
@@ -169,5 +171,4 @@ gboolean nmc_seen_sigint (void);
|
|||||||
void nmc_clear_sigint (void);
|
void nmc_clear_sigint (void);
|
||||||
void nmc_set_sigquit_internal (void);
|
void nmc_set_sigquit_internal (void);
|
||||||
|
|
||||||
|
|
||||||
#endif /* NMC_NMCLI_H */
|
#endif /* NMC_NMCLI_H */
|
||||||
|
@@ -2082,13 +2082,6 @@ typedef struct {
|
|||||||
NmcPropertyFuncsFields
|
NmcPropertyFuncsFields
|
||||||
} NmcPropertyFuncs;
|
} NmcPropertyFuncs;
|
||||||
|
|
||||||
/*
|
|
||||||
* We need NmCli in some _set_property functions, and they aren't passed NmCli.
|
|
||||||
* So use the global variable.
|
|
||||||
*/
|
|
||||||
/* Global variable defined in nmcli.c */
|
|
||||||
extern NmCli nm_cli;
|
|
||||||
|
|
||||||
NMSetting *
|
NMSetting *
|
||||||
nmc_setting_new_for_name (const char *name)
|
nmc_setting_new_for_name (const char *name)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user