Deleted Added
full compact
main.c (43561) main.c (44463)
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: main.c,v 1.14 1998/11/02 23:28:11 msmith Exp $
26 * $Id: main.c,v 1.1 1999/02/03 08:39:09 kato Exp $
27 */
28
29/*
30 * MD bootstrap main() and assorted miscellaneous
31 * commands.
32 */
33
34#include <stand.h>

--- 124 unchanged lines hidden (view full) ---

159 major = B_TYPE(initial_bootdev);
160
161 /*
162 * If we are booted by an old bootstrap, we have to guess at the BIOS
163 * unit number. We will loose if there is more than one disk type
164 * and we are not booting from the lowest-numbered disk type
165 * (ie. SCSI when IDE also exists).
166 */
27 */
28
29/*
30 * MD bootstrap main() and assorted miscellaneous
31 * commands.
32 */
33
34#include <stand.h>

--- 124 unchanged lines hidden (view full) ---

159 major = B_TYPE(initial_bootdev);
160
161 /*
162 * If we are booted by an old bootstrap, we have to guess at the BIOS
163 * unit number. We will loose if there is more than one disk type
164 * and we are not booting from the lowest-numbered disk type
165 * (ie. SCSI when IDE also exists).
166 */
167#ifdef PC98
168 if (major == 6)
169 biosdev = 0x30 + B_UNIT(initial_bootdev);
170 else
171 biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev);
167#ifdef PC98
168 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */
169 if (B_TYPE(initial_bootdev) == 6)
170 biosdev = 0x30 + B_UNIT(initial_bootdev);
171 else
172 biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev);
172#else
173 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */
174 biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */
175#endif
176 }
177
178 if ((currdev.d_kind.biosdisk.unit = bd_bios2unit(biosdev)) == -1) {
179 printf("Can't work out which disk we are booting from.\n"

--- 65 unchanged lines hidden ---
173#else
174 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */
175 biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */
176#endif
177 }
178
179 if ((currdev.d_kind.biosdisk.unit = bd_bios2unit(biosdev)) == -1) {
180 printf("Can't work out which disk we are booting from.\n"

--- 65 unchanged lines hidden ---