diff --git a/src/app/rpmostree-builtin-compose.c b/src/app/rpmostree-builtin-compose.c index 35baa3e0..5f0e8f4b 100644 --- a/src/app/rpmostree-builtin-compose.c +++ b/src/app/rpmostree-builtin-compose.c @@ -28,12 +28,7 @@ #include -typedef struct { - const char *name; - int (*fn) (int argc, char **argv, GCancellable *cancellable, GError **error); -} RpmOstreeComposeCommand; - -static RpmOstreeComposeCommand compose_subcommands[] = { +static RpmOstreeCommand compose_subcommands[] = { { "tree", rpmostree_compose_builtin_tree }, { NULL, NULL } }; @@ -41,7 +36,7 @@ static RpmOstreeComposeCommand compose_subcommands[] = { static GOptionContext * compose_option_context_new_with_commands (void) { - RpmOstreeComposeCommand *command = compose_subcommands; + RpmOstreeCommand *command = compose_subcommands; GOptionContext *context; GString *summary; @@ -65,7 +60,7 @@ compose_option_context_new_with_commands (void) int rpmostree_builtin_compose (int argc, char **argv, GCancellable *cancellable, GError **error) { - RpmOstreeComposeCommand *subcommand; + RpmOstreeCommand *subcommand; const char *subcommand_name = NULL; g_autofree char *prgname = NULL; int exit_status = EXIT_SUCCESS; diff --git a/src/app/rpmostree-builtin-container.c b/src/app/rpmostree-builtin-container.c index b609ad30..4216263c 100644 --- a/src/app/rpmostree-builtin-container.c +++ b/src/app/rpmostree-builtin-container.c @@ -23,12 +23,7 @@ #include "rpmostree-container-builtins.h" #include "rpmostree-rpm-util.h" -typedef struct { - const char *name; - int (*fn) (int argc, char **argv, GCancellable *cancellable, GError **error); -} RpmOstreeContainerCommand; - -static RpmOstreeContainerCommand container_subcommands[] = { +static RpmOstreeCommand container_subcommands[] = { { "init", rpmostree_container_builtin_init }, { "assemble", rpmostree_container_builtin_assemble }, /* { "start", rpmostree_container_builtin_start }, */ @@ -39,7 +34,7 @@ static RpmOstreeContainerCommand container_subcommands[] = { static GOptionContext * container_option_context_new_with_commands (void) { - RpmOstreeContainerCommand *command = container_subcommands; + RpmOstreeCommand *command = container_subcommands; GOptionContext *context; GString *summary; @@ -63,7 +58,7 @@ container_option_context_new_with_commands (void) int rpmostree_builtin_container (int argc, char **argv, GCancellable *cancellable, GError **error) { - RpmOstreeContainerCommand *subcommand; + RpmOstreeCommand *subcommand; const char *subcommand_name = NULL; g_autofree char *prgname = NULL; int exit_status = EXIT_SUCCESS; diff --git a/src/app/rpmostree-builtin-db.c b/src/app/rpmostree-builtin-db.c index 56c12c67..832c97ec 100644 --- a/src/app/rpmostree-builtin-db.c +++ b/src/app/rpmostree-builtin-db.c @@ -23,12 +23,7 @@ #include "rpmostree-db-builtins.h" #include "rpmostree-rpm-util.h" -typedef struct { - const char *name; - int (*fn) (int argc, char **argv, GCancellable *cancellable, GError **error); -} RpmOstreeDbCommand; - -static RpmOstreeDbCommand rpm_subcommands[] = { +static RpmOstreeCommand rpm_subcommands[] = { { "diff", rpmostree_db_builtin_diff }, { "list", rpmostree_db_builtin_list }, { "version", rpmostree_db_builtin_version }, @@ -45,7 +40,7 @@ static GOptionEntry global_entries[] = { static GOptionContext * rpm_option_context_new_with_commands (void) { - RpmOstreeDbCommand *command = rpm_subcommands; + RpmOstreeCommand *command = rpm_subcommands; GOptionContext *context; GString *summary; @@ -127,7 +122,7 @@ out: int rpmostree_builtin_db (int argc, char **argv, GCancellable *cancellable, GError **error) { - RpmOstreeDbCommand *subcommand; + RpmOstreeCommand *subcommand; const char *subcommand_name = NULL; g_autofree char *prgname = NULL; int exit_status = EXIT_SUCCESS; diff --git a/src/app/rpmostree-builtin-internals.c b/src/app/rpmostree-builtin-internals.c index 9f087d17..3b8d40cd 100644 --- a/src/app/rpmostree-builtin-internals.c +++ b/src/app/rpmostree-builtin-internals.c @@ -23,12 +23,7 @@ #include "rpmostree-internals-builtins.h" #include "rpmostree-rpm-util.h" -typedef struct { - const char *name; - int (*fn) (int argc, char **argv, GCancellable *cancellable, GError **error); -} RpmOstreeInternalsCommand; - -static RpmOstreeInternalsCommand internals_subcommands[] = { +static RpmOstreeCommand internals_subcommands[] = { { "unpack", rpmostree_internals_builtin_unpack }, { NULL, NULL } }; @@ -42,7 +37,7 @@ static GOptionEntry global_entries[] = { static GOptionContext * internals_option_context_new_with_commands (void) { - RpmOstreeInternalsCommand *command = internals_subcommands; + RpmOstreeCommand *command = internals_subcommands; GOptionContext *context; GString *summary; @@ -66,7 +61,7 @@ internals_option_context_new_with_commands (void) int rpmostree_builtin_internals (int argc, char **argv, GCancellable *cancellable, GError **error) { - RpmOstreeInternalsCommand *subcommand; + RpmOstreeCommand *subcommand; const char *subcommand_name = NULL; g_autofree char *prgname = NULL; int exit_status = EXIT_SUCCESS;