Deleted Added
full compact
biosdisk.c (163897) biosdisk.c (172921)
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

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

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
27#include <sys/cdefs.h>
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

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

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
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/boot/pc98/libpc98/biosdisk.c 163897 2006-11-02 01:23:18Z marcel $");
28__FBSDID("$FreeBSD: head/sys/boot/pc98/libpc98/biosdisk.c 172921 2007-10-24 04:03:25Z jhb $");
29
30/*
31 * BIOS disk device handling.
32 *
33 * Ideas and algorithms from:
34 *
35 * - NetBSD libi386/biosdisk.c
36 * - FreeBSD biosboot/disk.c

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

1100 /* XXX a better kludge to set the root disk unit number */
1101 if ((nip = getenv("root_disk_unit")) != NULL) {
1102 i = strtol(nip, &cp, 0);
1103 /* check for parse error */
1104 if ((cp != nip) && (*cp == 0))
1105 unit = i;
1106 }
1107
29
30/*
31 * BIOS disk device handling.
32 *
33 * Ideas and algorithms from:
34 *
35 * - NetBSD libi386/biosdisk.c
36 * - FreeBSD biosboot/disk.c

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

1100 /* XXX a better kludge to set the root disk unit number */
1101 if ((nip = getenv("root_disk_unit")) != NULL) {
1102 i = strtol(nip, &cp, 0);
1103 /* check for parse error */
1104 if ((cp != nip) && (*cp == 0))
1105 unit = i;
1106 }
1107
1108 rootdev = MAKEBOOTDEV(major,
1109 (dev->d_kind.biosdisk.slice + 1) >> 4, /* XXX slices may be wrong here */
1110 (dev->d_kind.biosdisk.slice + 1) & 0xf,
1111 unit,
1112 dev->d_kind.biosdisk.partition);
1108 rootdev = MAKEBOOTDEV(major, dev->d_kind.biosdisk.slice + 1, unit,
1109 dev->d_kind.biosdisk.partition);
1113 DEBUG("dev is 0x%x\n", rootdev);
1114 return(rootdev);
1115}
1110 DEBUG("dev is 0x%x\n", rootdev);
1111 return(rootdev);
1112}