disks.c revision 8281
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $Id: install.c,v 1.5 1995/05/04 03:51:16 jkh Exp $
8 *
9 * Copyright (c) 1995
10 *	Jordan Hubbard.  All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer,
17 *    verbatim and that no modifications are made prior to this
18 *    point in the file.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 *    notice, this list of conditions and the following disclaimer in the
21 *    documentation and/or other materials provided with the distribution.
22 * 3. All advertising materials mentioning features or use of this software
23 *    must display the following acknowledgement:
24 *	This product includes software developed by Jordan Hubbard
25 *	for the FreeBSD Project.
26 * 4. The name of Jordan Hubbard or the FreeBSD project may not be used to
27 *    endorse or promote products derived from this software without specific
28 *    prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY JORDAN HUBBARD ``AS IS'' AND
31 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
32 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
33 * ARE DISCLAIMED.  IN NO EVENT SHALL JORDAN HUBBARD OR HIS PETS BE LIABLE
34 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
35 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
36 * OR SERVICES; LOSS OF USE, DATA, LIFE OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
38 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
39 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
40 * SUCH DAMAGE.
41 *
42 */
43
44#include "sysinstall.h"
45
46/* If the given disk has a root partition on it, return TRUE */
47static Boolean
48contains_root_partition(struct disk *d)
49{
50    return FALSE;
51}
52
53void
54partition_disk(struct disk *d)
55{
56}
57
58int
59write_disks(struct disk **disks)
60{
61    int i;
62    extern u_char boot1[], boot2[];
63    extern u_char mbr[], bteasy17[];
64
65    dialog_clear();
66    if (!msgYesNo("Last Chance!  Are you sure you want to write your changes to disk?")) {
67	for (i = 0; disks[i]; i++) {
68	    if (contains_root_partition(disks[i]))
69		Set_Boot_Blocks(disks[i], boot1, boot2);
70	    if (i == 0 && !msgYesNo("Would you like to install a boot manager?\n\nThis will allow you to easily select between other operating systems\non the first disk, as well as boot from a driver other than the first."))
71		Set_Boot_Mgr(disks[i], bteasy17);
72	    else if (i == 0 && !msgYesNo("Would you like to remove an existing boot manager?"))
73		Set_Boot_Mgr(disks[i], mbr);
74	    Write_Disk(disks[i]);
75	}
76	return 0;
77    }
78    return 1;
79}
80
81void
82make_filesystems(struct disk **disks)
83{
84}
85
86void
87cpio_extract(struct disk **disks)
88{
89}
90
91void
92extract_dists(struct disk **disks)
93{
94}
95
96void
97do_final_setup(struct disk **disks)
98{
99}
100
101