diff options
author | Roy Marples <roy@marples.name> | 2007-04-20 19:03:56 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-04-20 19:03:56 +0000 |
commit | 3979a1712de6868e15382bfbc9b3051f906ff677 (patch) | |
tree | b5a837b891de492b8d0186831404014a16fa3ce1 /src | |
parent | 35ee67f446277f5777a5b9f7feff3e37b315d9d0 (diff) |
Style fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/rc.c | 20 | ||||
-rw-r--r-- | src/runscript.c | 4 |
2 files changed, 12 insertions, 12 deletions
@@ -335,7 +335,7 @@ static char read_key (bool block) { struct termios termios; char c = 0; - + if (! isatty (STDIN_FILENO)) return (false); @@ -398,7 +398,7 @@ static void sulogin (bool cont) newenv = rc_filter_env (); #ifdef __linux__ execle ("/sbin/sulogin", "/sbin/sulogin", - getenv ("CONSOLE"), (char *) NULL, newenv); + getenv ("CONSOLE"), (char *) NULL, newenv); eerror ("%s: unable to exec `/sbin/sulogin': %s", applet, strerror (errno)); #else @@ -413,7 +413,7 @@ static void sulogin (bool cont) #ifdef __linux newenv = rc_filter_env (); execle ("/sbin/sulogin", "/sbin/sulogin", - getenv ("CONSOLE"), (char *) NULL, newenv); + getenv ("CONSOLE"), (char *) NULL, newenv); eerrorx ("%s: unable to exec `/sbin/sulogin': %s", applet, strerror (errno)); #else exit (EXIT_SUCCESS); @@ -528,7 +528,7 @@ static void handle_signal (int sig) if (pid > 0) remove_pid (pid); break; - + case SIGINT: if (! signame[0]) snprintf (signame, sizeof (signame), "SIGINT"); @@ -542,21 +542,21 @@ static void handle_signal (int sig) case SIGUSR1: eerror ("rc: Aborting!"); /* Kill any running services we have started */ - + signal (SIGCHLD, SIG_IGN); for (pl = service_pids; pl; pl = pl->next) kill (pl->pid, SIGTERM); - + /* Notify plugins we are aborting */ rc_plugin_run (rc_hook_abort, "rc"); - + /* Only drop into single user mode if we're booting */ run = getenv ("RUNLEVEL"); prev = getenv ("PREVLEVEL"); if ((prev && strcmp (prev, "S") == 0) || - (run && - (strcmp (run, "S") == 0 || - strcmp (run, "1") == 0))) + (run && + (strcmp (run, "S") == 0 || + strcmp (run, "1") == 0))) single_user (); exit (EXIT_FAILURE); diff --git a/src/runscript.c b/src/runscript.c index 73333605..45f83433 100644 --- a/src/runscript.c +++ b/src/runscript.c @@ -280,13 +280,13 @@ static bool svc_exec (const char *service, const char *arg1, const char *arg2) execl (RC_SVCDIR "runscript.sh", service, service, arg1, arg2, (char *) NULL); eerror ("%s: exec `" RC_SVCDIR "runscript.sh': %s", - service, strerror (errno)); + service, strerror (errno)); _exit (EXIT_FAILURE); } else { execl (RC_LIBDIR "sh/runscript.sh", service, service, arg1, arg2, (char *) NULL); eerror ("%s: exec `" RC_LIBDIR "sh/runscript.sh': %s", - service, strerror (errno)); + service, strerror (errno)); _exit (EXIT_FAILURE); } } |