mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
@@ -34,6 +34,10 @@
|
||||
#define EG25_DATADIR "/usr/share/eg25-manager"
|
||||
#endif
|
||||
|
||||
#ifndef EG25_VERSION
|
||||
#define EG25_VERSION "0.0.0"
|
||||
#endif
|
||||
|
||||
#define POWERON_DELAY_US 100000UL
|
||||
|
||||
static gboolean quit_app(struct EG25Manager *manager)
|
||||
@@ -286,10 +290,12 @@ int main(int argc, char *argv[])
|
||||
g_autoptr(GError) err = NULL;
|
||||
struct EG25Manager manager;
|
||||
gchar *config_file = NULL;
|
||||
gboolean show_version = FALSE;
|
||||
toml_table_t *toml_config[EG25_CONFIG_COUNT];
|
||||
toml_table_t *manager_config[EG25_CONFIG_COUNT];
|
||||
const GOptionEntry options[] = {
|
||||
{ "config", 'c', 0, G_OPTION_ARG_STRING, &config_file, "Config file to use.", NULL },
|
||||
{ "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, "Display version information and exit.", NULL },
|
||||
{ NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -306,6 +312,11 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (show_version) {
|
||||
printf("eg25-manager version %s\n", EG25_VERSION);
|
||||
return 0;
|
||||
}
|
||||
|
||||
manager.loop = g_main_loop_new(NULL, FALSE);
|
||||
|
||||
toml_config[EG25_CONFIG_SYS] = parse_config_file(NULL, TRUE);
|
||||
|
Reference in New Issue
Block a user