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/i386/libi386/biosdisk.c 163897 2006-11-02 01:23:18Z marcel $"); | 28__FBSDID("$FreeBSD: head/sys/boot/i386/libi386/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 --- 1179 unchanged lines hidden (view full) --- 1216 /* XXX a better kludge to set the root disk unit number */ 1217 if ((nip = getenv("root_disk_unit")) != NULL) { 1218 i = strtol(nip, &cp, 0); 1219 /* check for parse error */ 1220 if ((cp != nip) && (*cp == 0)) 1221 unit = i; 1222 } 1223 | 29 30/* 31 * BIOS disk device handling. 32 * 33 * Ideas and algorithms from: 34 * 35 * - NetBSD libi386/biosdisk.c 36 * - FreeBSD biosboot/disk.c --- 1179 unchanged lines hidden (view full) --- 1216 /* XXX a better kludge to set the root disk unit number */ 1217 if ((nip = getenv("root_disk_unit")) != NULL) { 1218 i = strtol(nip, &cp, 0); 1219 /* check for parse error */ 1220 if ((cp != nip) && (*cp == 0)) 1221 unit = i; 1222 } 1223 |
1224 rootdev = MAKEBOOTDEV(major, 1225 (dev->d_kind.biosdisk.slice + 1) >> 4, /* XXX slices may be wrong here */ 1226 (dev->d_kind.biosdisk.slice + 1) & 0xf, 1227 unit, 1228 dev->d_kind.biosdisk.partition); | 1224 rootdev = MAKEBOOTDEV(major, dev->d_kind.biosdisk.slice + 1, unit, 1225 dev->d_kind.biosdisk.partition); |
1229 DEBUG("dev is 0x%x\n", rootdev); 1230 return(rootdev); 1231} | 1226 DEBUG("dev is 0x%x\n", rootdev); 1227 return(rootdev); 1228} |