Deleted Added
full compact
main.c (50477) main.c (53218)
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 * $FreeBSD: head/sys/boot/pc98/loader/main.c 50477 1999-08-28 01:08:13Z peter $
26 * $FreeBSD: head/sys/boot/pc98/loader/main.c 53218 1999-11-16 11:59:19Z nyan $
27 */
28
29/*
30 * MD bootstrap main() and assorted miscellaneous
31 * commands.
32 */
33
34#include <stand.h>

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

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
27 */
28
29/*
30 * MD bootstrap main() and assorted miscellaneous
31 * commands.
32 */
33
34#include <stand.h>

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

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

--- 65 unchanged lines hidden ---