mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
Now stage2 runs all the way..
This commit is contained in:
parent
5500c9038c
commit
57a3ad3e15
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3753
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: utils.c,v 1.4 1994/10/20 19:30:56 ache Exp $
|
||||
* $Id: exec.c,v 1.1 1994/10/21 02:14:49 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -33,7 +33,6 @@ exec(int magic, char *cmd, char *args, ...)
|
||||
int pid, w, status;
|
||||
char *argv[EXEC_MAXARG];
|
||||
int arg = 0;
|
||||
int no_args = 0;
|
||||
va_list ap;
|
||||
struct stat dummy;
|
||||
int i;
|
||||
@ -53,13 +52,19 @@ exec(int magic, char *cmd, char *args, ...)
|
||||
|
||||
if ((pid = fork()) == 0) {
|
||||
switch (magic) {
|
||||
case 0:
|
||||
close(0); open("/dev/null",O_RDONLY);
|
||||
close(1); open("/dev/null",O_WRONLY);
|
||||
close(2); open("/dev/null",O_WRONLY);
|
||||
break;
|
||||
case 1:
|
||||
close(0);
|
||||
i = open("/file.list",O_RDONLY);
|
||||
if (i != 0) {
|
||||
perror("/etc/file.list");
|
||||
exit(2);
|
||||
perror("Couldn't open /etc/file.list");
|
||||
}
|
||||
close(1); open("/dev/null",O_WRONLY);
|
||||
close(2); open("/dev/null",O_WRONLY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -6,7 +6,7 @@
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* $Id: stage2.c,v 1.3 1994/10/20 19:30:53 ache Exp $
|
||||
* $Id: stage2.c,v 1.4 1994/10/21 02:14:51 phk Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -44,7 +44,7 @@ stage2()
|
||||
strcat(pbuf, *p);
|
||||
i = exec(0, "/bin/newfs", "/bin/newfs", pbuf, 0);
|
||||
if (i)
|
||||
Fatal("Exec(/bin/newfs) failed, code=%d.",i);
|
||||
TellEm("Exec(/bin/newfs) failed, code=%d.",i);
|
||||
}
|
||||
|
||||
for(q=mountpoint,p = devicename; *p; p++,q++) {
|
||||
@ -100,4 +100,5 @@ stage2()
|
||||
if (unmount(dbuf, 0) == -1)
|
||||
Fatal("Error unmounting %s.",dbuf);
|
||||
}
|
||||
dialog_msgbox(TITLE,"Remove the floppydisk from the drive, and hit return to reboot from the harddisk",6, 75, 1);
|
||||
}
|
||||
|
@ -20,8 +20,8 @@
|
||||
#define SCRATCHSIZE 1024
|
||||
#define ERRMSGSIZE 256
|
||||
#define DEFROOTSIZE 16
|
||||
#define DEFSWAPSIZE 32
|
||||
#define DEFUSRSIZE 120
|
||||
#define DEFSWAPSIZE 16
|
||||
#define DEFUSRSIZE 80 /* My disk is not that big Paul ! */
|
||||
|
||||
#define BOOT_MAGIC 0xAA55
|
||||
#define ACTIVE 0x80
|
||||
|
Loading…
Reference in New Issue
Block a user