This can entirely be handled in stage2 now. --- loader/kickstart.c | 61 ---------------------------------------------------- loader/loader.h | 4 +- 2 files changed, 2 insertions(+), 63 deletions(-) diff --git a/loader/kickstart.c b/loader/kickstart.c index f2c758d..ae6b3b2 100644 --- a/loader/kickstart.c +++ b/loader/kickstart.c @@ -77,12 +77,6 @@ static void setCmdlineMode(struct loaderData_s * loaderData, int argc, char ** argv); static void setSELinux(struct loaderData_s * loaderData, int argc, char ** argv); -static void setPowerOff(struct loaderData_s * loaderData, int argc, - char ** argv); -static void setHalt(struct loaderData_s * loaderData, int argc, - char ** argv); -static void setShutdown(struct loaderData_s * loaderData, int argc, - char ** argv); static void setMediaCheck(struct loaderData_s * loaderData, int argc, char ** argv); static void setUpdates(struct loaderData_s * loaderData, int argc, @@ -102,9 +96,6 @@ struct ksCommandNames ksTable[] = { { KS_CMD_DEVICE, "device", loadKickstartModule }, { KS_CMD_CMDLINE, "cmdline", setCmdlineMode }, { KS_CMD_SELINUX, "selinux", setSELinux }, - { KS_CMD_POWEROFF, "poweroff", setPowerOff }, - { KS_CMD_HALT, "halt", setHalt }, - { KS_CMD_SHUTDOWN, "shutdown", setShutdown }, { KS_CMD_MEDIACHECK, "mediacheck", setMediaCheck }, { KS_CMD_UPDATES, "updates", setUpdates }, { KS_CMD_NONE, NULL, NULL } @@ -475,58 +466,6 @@ static void setSELinux(struct loaderData_s * loaderData, int argc, return; } -static void setPowerOff(struct loaderData_s * loaderData, int argc, - char ** argv) { - if (!FL_NOKILL(flags)) - flags |= LOADER_FLAGS_POWEROFF; - return; -} - -static void setHalt(struct loaderData_s * loaderData, int argc, - char ** argv) { - if (!FL_NOKILL(flags)) - flags |= LOADER_FLAGS_HALT; - return; -} - -static void setShutdown(struct loaderData_s * loaderData, int argc, - char ** argv) { - gint eject = 0, reboot = 0, halt = 0, poweroff = 0; - GOptionContext *optCon = g_option_context_new(NULL); - GError *optErr = NULL; - GOptionEntry ksOptions[] = { - { "eject", 'e', 0, G_OPTION_ARG_INT, &eject, NULL, NULL }, - { "reboot", 'r', 0, G_OPTION_ARG_INT, &reboot, NULL, NULL }, - { "halt", 'h', 0, G_OPTION_ARG_INT, &halt, NULL, NULL }, - { "poweroff", 'p', 0, G_OPTION_ARG_INT, &poweroff, NULL, NULL }, - { NULL }, - }; - - g_option_context_set_help_enabled(optCon, FALSE); - g_option_context_add_main_entries(optCon, ksOptions, NULL); - - if (!g_option_context_parse(optCon, &argc, &argv, &optErr)) { - startNewt(); - newtWinMessage(_("Kickstart Error"), _("OK"), - _("Bad argument to shutdown kickstart method " - "command: %s"), optErr->message); - g_error_free(optErr); - g_option_context_free(optCon); - return; - } - - g_option_context_free(optCon); - - if (FL_NOKILL(flags)) { - flags |= LOADER_FLAGS_HALT; - } else { - if (poweroff) - flags |= LOADER_FLAGS_POWEROFF; - if ((!poweroff && !reboot) || (halt)) - flags |= LOADER_FLAGS_HALT; - } -} - static void setMediaCheck(struct loaderData_s * loaderData, int argc, char ** argv) { flags |= LOADER_FLAGS_MEDIACHECK; diff --git a/loader/loader.h b/loader/loader.h index ebf3766..929da10 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -33,14 +33,14 @@ #define LOADER_FLAGS_RESCUE (((uint64_t) 1) << 3) #define LOADER_FLAGS_KICKSTART (((uint64_t) 1) << 4) #define LOADER_FLAGS_KICKSTART_SEND_MAC (((uint64_t) 1) << 5) -#define LOADER_FLAGS_POWEROFF (((uint64_t) 1) << 6) +/* #6 unused */ #define LOADER_FLAGS_NOPROBE (((uint64_t) 1) << 7) #define LOADER_FLAGS_MODDISK (((uint64_t) 1) << 8) #define LOADER_FLAGS_EARLY_NETWORKING (((uint64_t) 1) << 9) #define LOADER_FLAGS_SERIAL (((uint64_t) 1) << 10) #define LOADER_FLAGS_UPDATES (((uint64_t) 1) << 11) #define LOADER_FLAGS_KSFILE (((uint64_t) 1) << 12) -#define LOADER_FLAGS_HALT (((uint64_t) 1) << 13) +/* lucky #13 unused */ #define LOADER_FLAGS_SELINUX (((uint64_t) 1) << 14) #define LOADER_FLAGS_VIRTPCONSOLE (((uint64_t) 1) << 15) /* #16 unused */ -- 1.6.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list