There's no code left in these files that I want to move anywhere, so the remaining parts can go. --- loader/init.c | 160 --------------------------------------------------------- loader/init.h | 31 ----------- 2 files changed, 0 insertions(+), 191 deletions(-) delete mode 100644 loader/init.c delete mode 100644 loader/init.h diff --git a/loader/init.c b/loader/init.c deleted file mode 100644 index 3138b87..0000000 --- a/loader/init.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * init.c: This is the install type init - * - * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 - * Red Hat, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Author(s): Erik Troan (ewt@xxxxxxxxxx) - * Jeremy Katz (katzj@xxxxxxxxxx) - */ - -#include <ctype.h> -#include <dirent.h> -#include <errno.h> -#include <execinfo.h> -#include <fcntl.h> -#include <net/if.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/ioctl.h> -#include <sys/klog.h> -#include <sys/mount.h> -#include <sys/socket.h> -#include <sys/stat.h> -#include <sys/swap.h> -#include <sys/time.h> -#include <sys/resource.h> -#include <sys/types.h> -#include <sys/un.h> -#include <sys/wait.h> -#include <unistd.h> -#include <sys/ioctl.h> -#include <sys/reboot.h> -#include <linux/vt.h> -#include <termios.h> -#include <libgen.h> -#include <glib.h> - -#include "init.h" -#include "copy.h" -#include "modules.h" -#include "readvars.h" - -#include <asm/types.h> -#include <linux/serial.h> - -/* - * this needs to handle the following cases: - * - * 1) run from a CD root filesystem - * 2) run from a read only nfs rooted filesystem - * 3) run from a floppy - * 4) run from a floppy that's been loaded into a ramdisk - * - */ - -struct termios ts; - -static void printstr(char * string) { - write(1, string, strlen(string)); -} - -static void fatal_error(int usePerror) { - printf("failed.\n"); - - printf("\nI can't recover from this.\n"); -#if !defined(__s390__) && !defined(__s390x__) - while (1) ; -#endif -} - -int main(int argc, char **argv) { - pid_t installpid; - int waitStatus; - int doShutdown =0; - reboot_action shutdown_method = HALT; - int isSerial = 0; - gboolean isDevelMode = FALSE; - char * console = NULL; - int doKill = 1; - char * argvc[15]; - char ** argvp = argvc; - int i; - int ret; - gpointer value = NULL; - - /* turn off screen blanking */ - printstr("\033[9;0]"); - printstr("\033[8]"); - - umask(022); - - /* set up any environment variables that aren't totally static */ - setupEnv(); - - printstr("\nGreetings.\n"); - - printf("anaconda installer init version %s starting\n", VERSION); - - if (!(installpid = fork())) { - /* child */ - *argvp++ = "/sbin/loader"; - - if (isSerial == 3) { - *argvp++ = "--virtpconsole"; - *argvp++ = console; - } - - *argvp++ = NULL; - - printf("running %s\n", argvc[0]); - execve(argvc[0], argvc, env); - } - - while (!doShutdown) { - pid_t childpid; - childpid = wait(&waitStatus); - - if (childpid == installpid) { - doShutdown = 1; - ioctl(0, VT_ACTIVATE, 1); - } - } - - if (!WIFEXITED(waitStatus) || - (WIFEXITED(waitStatus) && WEXITSTATUS(waitStatus))) { - - restore_console(&orig_cmode, orig_flags); - - shutdown_method = DELAYED_REBOOT; - printf("install exited abnormally [%d/%d] ", WIFEXITED(waitStatus), - WEXITSTATUS(waitStatus)); - if (WIFSIGNALED(waitStatus)) { - printf("-- received signal %d", WTERMSIG(waitStatus)); - } - printf("\n"); - - } else { - shutdown_method = REBOOT; - } - - return 0; -} - -/* vim:tw=78:ts=4:et:sw=4 - */ diff --git a/loader/init.h b/loader/init.h deleted file mode 100644 index e1e5b70..0000000 --- a/loader/init.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * init.h - * - * Copyright (C) 2009 Red Hat, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ -#ifndef INIT_H -#define INIT_H - -typedef enum { - REBOOT, - POWEROFF, - HALT, - /* gives user a chance to read the trace before scrolling the text out - with disk unmounting and termination info */ - DELAYED_REBOOT -} reboot_action; - -#endif /* INIT_H */ -- 1.7.4.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list