9c354a29e7
I have walked all over Paul Richards code again, and severely lobotomized some of his stuff, in order to cut some corners for the 2.0-Alpha release. I belive that we can now manipulate fdisk and disklabel-stuff sufficiently for the release to actually be produced. It's not that I don't like Paul and his code, I just need something I can kick out of the door RSN. Sysinstall is now under absolute code-freeze, only Jordan has my permission to commit to this code (stage0 & 5). I would appreciate if everybody else would finds problems in sysinstall send patches to me, and I will commit them. THANKYOU. The fdisk/disklabel editors are made in pure ncurses, and follow a model "a`la spreadsheet". There are some important functions which are missing still, and I would appreciate if somebody would look at them. The FDISK part needs a "whole-disk" option, and it needs a "rewrite MBR-boot code" option. The DISKLABEL part needs to be able to "import DOS-partition". Both need a "HELP" function, (display a file "/HELP" using dialog is OK). It seems to me like the wd.c and sd.c should reread the physical record when a DIOCGDINFO is made, so that they can pick up changes in the MBR-data. Otherwise there will be a couple of weird cases where we cannot avoid replicating code from the kernel. If you want to play with this, look at src/release/Makefile. You may need to step back to version 1.38 of sys/i386/isa/fd.c to make "rootable" floppies, it is not clear at this time if that indeed is the problem I have been having. Sleep well, my friends, and expect the real Alpha in 24H, if the tree is still solid.
81 lines
1.9 KiB
C
81 lines
1.9 KiB
C
/*
|
|
* Copyright (c) 1994, Jordan Hubbard, Paul Richards and Poul-Henning Kamp.
|
|
*
|
|
* All rights reserved.
|
|
*
|
|
* This software may be used, modified, copied, distributed, and
|
|
* sold, in both source and binary form provided that the above
|
|
* copyright and these terms are retained, verbatim, as the first
|
|
* lines of this file. Under no circumstances is the author
|
|
* responsible for the proper functioning of this software, nor does
|
|
* the author assume any responsibility for damages incurred with
|
|
* its use.
|
|
*
|
|
* [Note: This file bears almost no resemblance to what was here in an
|
|
* earlier incarnation].
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
#include <dialog.h>
|
|
|
|
#include "sysinstall.h"
|
|
|
|
static char *welcome[] = {
|
|
"View 'READ ME FIRST' File.",
|
|
"View FreeBSD Copyright Information.",
|
|
"Proceed with installation.",
|
|
"Repair existing installation ('fixit' mode).",
|
|
"Exit to shell.",
|
|
};
|
|
|
|
void
|
|
stage0()
|
|
{
|
|
int valid = 0;
|
|
|
|
if (!access(README_FILE, R_OK)) {
|
|
dialog_clear();
|
|
dialog_textbox("READ ME FIRST", README_FILE, 24, 80);
|
|
}
|
|
return;
|
|
|
|
do {
|
|
if (!dialog_menu("Welcome to FreeBSD!",
|
|
"Please select one of the following options.\n",
|
|
10, 75, 5, 5, welcome, selection))
|
|
valid = 1;
|
|
dialog_clear();
|
|
} while (!valid);
|
|
switch (atoi(selection)) {
|
|
case 1: /* View readme */
|
|
if (!access(README_FILE, R_OK)) {
|
|
dialog_clear();
|
|
dialog_textbox("READ ME FIRST", README_FILE, 24, 80);
|
|
}
|
|
break;
|
|
|
|
case 2: /* View copyrights */
|
|
if (!access(COPYRIGHT_FILE, R_OK)) {
|
|
dialog_clear();
|
|
dialog_textbox("COPYRIGHT", COPYRIGHT_FILE, 24, 80);
|
|
}
|
|
break;
|
|
|
|
case 3: /* Proceed (do nothing special, really) */
|
|
break;
|
|
|
|
case 4:
|
|
dialog_msgbox("Sorry!", "This feature not currently implemented.",
|
|
6, 75, 1);
|
|
break;
|
|
|
|
case 5:
|
|
exit(0);
|
|
break; /* hope not! :) */
|
|
}
|
|
}
|