diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-17 08:28:43 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2011-01-17 08:28:43 +0000 |
commit | e6fc30da61f72aa4266dea8f131c0ca7c4a79f4d (patch) | |
tree | 8dd40ceb91cae0bc88c9771979aaa478f9619160 /src/rc | |
parent | 49339525a98b5f472c902144706a663f8a9903d1 (diff) |
Clean up all trailing whitespace in src/.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/fstabinfo.c | 2 | ||||
-rw-r--r-- | src/rc/rc-applets.c | 4 | ||||
-rw-r--r-- | src/rc/rc-depend.c | 2 | ||||
-rw-r--r-- | src/rc/rc-logger.c | 2 | ||||
-rw-r--r-- | src/rc/rc-misc.c | 2 | ||||
-rw-r--r-- | src/rc/rc-plugin.c | 2 | ||||
-rw-r--r-- | src/rc/rc.c | 12 | ||||
-rw-r--r-- | src/rc/runscript.c | 26 | ||||
-rw-r--r-- | src/rc/start-stop-daemon.c | 6 |
9 files changed, 29 insertions, 29 deletions
diff --git a/src/rc/fstabinfo.c b/src/rc/fstabinfo.c index a05bfae6..69b5bbdd 100644 --- a/src/rc/fstabinfo.c +++ b/src/rc/fstabinfo.c @@ -109,7 +109,7 @@ do_mount(struct ENT *ent) argv[6] = ENT_FILE(*ent); argv[7] = NULL; switch (pid = vfork()) { - case -1: + case -1: eerrorx("%s: vfork: %s", applet, strerror(errno)); /* NOTREACHED */ case 0: diff --git a/src/rc/rc-applets.c b/src/rc/rc-applets.c index 11bc2d50..ba2815d7 100644 --- a/src/rc/rc-applets.c +++ b/src/rc/rc-applets.c @@ -298,7 +298,7 @@ do_service(int argc, char **argv) } } ok = rc_service_started_daemon(service, exec, NULL, idx); - + } else if (strcmp(applet, "service_crashed") == 0) { ok = (_rc_can_find_pids() && rc_service_daemons_crashed(service) && @@ -476,7 +476,7 @@ run_applets(int argc, char **argv) exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); - }; + }; if (applet[0] == 'e' || (applet[0] == 'v' && applet[1] == 'e')) exit(do_e(argc, argv)); diff --git a/src/rc/rc-depend.c b/src/rc/rc-depend.c index 2b78fcbd..7a4656e1 100644 --- a/src/rc/rc-depend.c +++ b/src/rc/rc-depend.c @@ -176,7 +176,7 @@ rc_depend(int argc, char **argv) case_RC_COMMON_GETOPT } } - + if(deptree_file) { if(!(deptree = rc_deptree_load_file(deptree_file))) eerrorx("failed to load deptree"); diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c index 47349893..e45c327d 100644 --- a/src/rc/rc-logger.c +++ b/src/rc/rc-logger.c @@ -172,7 +172,7 @@ rc_logger_open(const char *level) ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws); if (openpty(&rc_logger_tty, &slave_tty, NULL, &tt, &ws)) return; - } else + } else if (openpty(&rc_logger_tty, &slave_tty, NULL, NULL, NULL)) return; diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c index 0239f9d4..92be3b8a 100644 --- a/src/rc/rc-misc.c +++ b/src/rc/rc-misc.c @@ -316,7 +316,7 @@ exec_service(const char *service, const char *arg) fd = svc_lock(basename_c(service)); if (fd == -1) return -1; - + file = rc_service_resolve(service); if (!exists(file)) { rc_service_mark(service, RC_SERVICE_STOPPED); diff --git a/src/rc/rc-plugin.c b/src/rc/rc-plugin.c index 592eb09c..6f07471d 100644 --- a/src/rc/rc-plugin.c +++ b/src/rc/rc-plugin.c @@ -200,7 +200,7 @@ rc_plugin_run(RC_HOOK hook, const char *value) sigaction(SIGUSR1, &sa, NULL); sigaction(SIGWINCH, &sa, NULL); sigprocmask(SIG_SETMASK, &old, NULL); - + rc_in_plugin = true; close(pfd[0]); rc_environ_fd = fdopen(pfd[1], "w"); diff --git a/src/rc/rc.c b/src/rc/rc.c index a2e095db..af346657 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -153,7 +153,7 @@ cleanup(void) #ifdef DEBUG_MEMORY while (p1) { - p2 = LIST_NEXT(p1, entries); + p2 = LIST_NEXT(p1, entries); free(p1); p1 = p2; } @@ -315,7 +315,7 @@ open_shell(void) { const char *shell; struct passwd *pw; - + #ifdef __linux__ const char *sys = rc_sys(); @@ -586,7 +586,7 @@ do_stop_services(const char *newlevel, bool parallel, bool going_down) } crashed = rc_conf_yesno("rc_crashed_stop"); - + nostop = rc_stringlist_split(rc_conf_value("rc_nostop"), " "); TAILQ_FOREACH_REVERSE(service, stop_services, rc_stringlist, entries) { @@ -821,9 +821,9 @@ main(int argc, char **argv) * than trusting argv[0], as argv[0] is not going to be the applet value if * we are doing SELinux context switching. For this, we allow calls such as * 'rc --applet APPLET', and shift ALL of argv down by two array items. */ - if(strcmp(basename_c(argv[0]), "rc") == 0 && strcmp(argv[1], "--applet") == 0) { - for(i = 2; i < argc; i++) - argv[i-2] = argv[i]; + if(strcmp(basename_c(argv[0]), "rc") == 0 && strcmp(argv[1], "--applet") == 0) { + for(i = 2; i < argc; i++) + argv[i-2] = argv[i]; argv[argc-2] = NULL; argv[argc-1] = NULL; argc -= 2; diff --git a/src/rc/runscript.c b/src/rc/runscript.c index 1c60c249..0eca4879 100644 --- a/src/rc/runscript.c +++ b/src/rc/runscript.c @@ -451,7 +451,7 @@ svc_exec(const char *arg1, const char *arg2) signal_pipe[0] = signal_pipe[1] = -1; sigprocmask (SIG_SETMASK, &oldmask, NULL); - + if (master_tty >= 0) { /* Why did we do this? */ /* signal (SIGWINCH, SIG_IGN); */ @@ -572,7 +572,7 @@ svc_start_check(void) RC_SERVICE state; state = rc_service_state(service); - + if (in_background) { if (!(state & (RC_SERVICE_INACTIVE | RC_SERVICE_STOPPED))) exit(EXIT_FAILURE); @@ -583,7 +583,7 @@ svc_start_check(void) " next runlevel", applet); } - if (exclusive_fd == -1) + if (exclusive_fd == -1) exclusive_fd = svc_lock(applet); if (exclusive_fd == -1) { if (errno == EACCES) @@ -603,7 +603,7 @@ svc_start_check(void) else if (state & RC_SERVICE_INACTIVE && !in_background) ewarnx("WARNING: %s has already started, but is inactive", applet); - + rc_service_mark(service, RC_SERVICE_STARTING); hook_out = RC_HOOK_SERVICE_START_OUT; rc_plugin_run(RC_HOOK_SERVICE_START_IN, applet); @@ -619,7 +619,7 @@ svc_start_deps(void) size_t len; char *p, *tmp; pid_t pid; - + errno = 0; if (rc_conf_yesno("rc_depend_strict") || errno == ENOENT) depoptions |= RC_DEP_STRICT; @@ -725,7 +725,7 @@ svc_start_deps(void) n = 0; TAILQ_FOREACH(svc, tmplist, entries) { rc_service_schedule_start(svc->value, service); - use_services = rc_deptree_depend(deptree, + use_services = rc_deptree_depend(deptree, "iprovide", svc->value); TAILQ_FOREACH(svc2, use_services, entries) rc_service_schedule_start(svc2->value, service); @@ -760,7 +760,7 @@ static void svc_start_real() { bool started; RC_STRING *svc, *svc2; - + if (ibsave) setenv("IN_BACKGROUND", ibsave, 1); hook_out = RC_HOOK_SERVICE_START_DONE; @@ -873,7 +873,7 @@ svc_stop_deps(RC_SERVICE state) if (state & RC_SERVICE_WASINACTIVE) return; - + errno = 0; if (rc_conf_yesno("rc_depend_strict") || errno == ENOENT) depoptions |= RC_DEP_STRICT; @@ -941,7 +941,7 @@ svc_stop_deps(RC_SERVICE state) } rc_stringlist_free(tmplist); tmplist = NULL; - + /* We now wait for other services that may use us and are * stopping. This is important when a runlevel stops */ services = rc_deptree_depends(deptree, types_mua, applet_list, @@ -959,7 +959,7 @@ static void svc_stop_real(void) { bool stopped; - + /* If we're stopping localmount, set LC_ALL=C so that * bash doesn't load anything blocking the unmounting of /usr */ if (strcmp(applet, "localmount") == 0) @@ -1138,7 +1138,7 @@ runscript(int argc, char **argv) file = basename_c(argv[1]); else file = basename_c(lnk); - dir = save; + dir = save; } else file = basename_c(argv[1]); ll = strlen(dir) + strlen(file) + 2; @@ -1206,7 +1206,7 @@ runscript(int argc, char **argv) #endif deps = true; - + /* Punt the first arg as its our service name */ argc--; argv++; @@ -1363,7 +1363,7 @@ runscript(int argc, char **argv) RC_SERVICE_INACTIVE) { TAILQ_FOREACH(svc, - restart_services, + restart_services, entries) if (rc_service_state(svc->value) & RC_SERVICE_STOPPED) diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c index bd6c7bfe..459bcf15 100644 --- a/src/rc/start-stop-daemon.c +++ b/src/rc/start-stop-daemon.c @@ -322,7 +322,7 @@ get_pid(const char *pidfile, bool quiet) fclose(fp); return -1; } - + fclose(fp); return pid; @@ -631,7 +631,7 @@ static const struct option longopts[] = { longopts_COMMON }; static const char * const longopts_help[] = { - "Set an ionice class:data when starting", + "Set an ionice class:data when starting", "Stop daemon", "Set a nicelevel when starting", "Retry schedule to use when stopping", @@ -1343,7 +1343,7 @@ start_stop_daemon(int argc, char **argv) if (start_wait > 0) { struct timespec ts; bool alive = false; - + ts.tv_sec = start_wait / 1000; ts.tv_nsec = (start_wait % 1000) * ONE_MS; if (nanosleep(&ts, NULL) == -1) { |