[launchd-changes] [22953] trunk/launchd/src/init.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Nov 16 11:17:39 PST 2006
Revision: 22953
http://trac.macosforge.org/projects/launchd/changeset/22953
Author: zarzycki at apple.com
Date: 2006-11-16 11:17:39 -0800 (Thu, 16 Nov 2006)
Log Message:
-----------
Dead code deletion.
Modified Paths:
--------------
trunk/launchd/src/init.c
Modified: trunk/launchd/src/init.c
===================================================================
--- trunk/launchd/src/init.c 2006-11-16 18:42:11 UTC (rev 22952)
+++ trunk/launchd/src/init.c 2006-11-16 19:17:39 UTC (rev 22953)
@@ -110,8 +110,6 @@
static void single_user(void);
static void runcom(void);
-static bool runcom_safe = false;
-static bool runcom_netboot = false;
static bool single_user_mode = false;
static bool run_runcom = true;
static pid_t single_user_pid = 0;
@@ -176,25 +174,10 @@
void
init_boot(bool sflag)
{
- int nbmib[2] = { CTL_KERN, KERN_NETBOOT };
- int sbmib[2] = { CTL_KERN, KERN_SAFEBOOT };
- uint32_t v = 0;
- size_t vsz = sizeof(v);
-
if (sflag) {
single_user_mode = true;
run_runcom = false;
}
-
- if (launchd_assumes(sysctl(nbmib, 2, &v, &vsz, NULL, 0) != -1)) {
- if (v != 0)
- runcom_netboot = true;
- }
- if (launchd_assumes(sysctl(sbmib, 2, &v, &vsz, NULL, 0) != -1)) {
- if (v != 0)
- runcom_safe = true;
- }
-
}
void
@@ -308,10 +291,6 @@
setctty(_PATH_CONSOLE, O_POPUP);
setenv("TERM", "vt100", 1);
- setenv("SafeBoot", runcom_safe ? "-x" : "", 1);
- setenv("VerboseFlag", "-v", 1); /* single user mode implies verbose mode */
- setenv("FsckSlash", runcom_fsck ? "-F" : "", 1);
- setenv("NetBoot", runcom_netboot ? "-N" : "", 1);
if (runcom_fsck) {
fprintf(stdout, "Singleuser boot -- fsck not done\n");
@@ -365,7 +344,6 @@
static void
runcom(void)
{
- bool runcom_fsck = should_fsck();
char *argv[] = { "/bin/launchctl", "bootstrap", NULL };
struct termios term;
int vdisable;
@@ -406,10 +384,6 @@
syslog(LOG_WARNING, "tcsetattr(\"%s\") %m", _PATH_CONSOLE);
}
- setenv("SafeBoot", runcom_safe ? "-x" : "", 1);
- setenv("FsckSlash", runcom_fsck ? "-F" : "", 1);
- setenv("NetBoot", runcom_netboot ? "-N" : "", 1);
-
execv(argv[0], argv);
stall("can't exec %s for %s: %m", _PATH_BSHELL, _PATH_RUNCOM);
exit(EXIT_FAILURE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20061116/77197ac6/attachment.html
More information about the launchd-changes
mailing list