FreeBSD Bugzilla – Attachment 13068 Details for
Bug 24997
[biosdisk] [patch] /boot/loader cannot handle extended dos partitions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.03 KB, created by
HASEGAWA Tomoki
on 2001-02-11 05:00:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
HASEGAWA Tomoki
Created:
2001-02-11 05:00:01 UTC
Size:
2.03 KB
patch
obsolete
>Index: biosdisk.c >=================================================================== >RCS file: /home/ncvs/src/sys/boot/i386/libi386/biosdisk.c,v >retrieving revision 1.26.2.6 >diff -u -r1.26.2.6 biosdisk.c >--- biosdisk.c 2000/12/28 13:10:47 1.26.2.6 >+++ biosdisk.c 2001/02/10 05:59:00 >@@ -132,7 +132,7 @@ > static int bd_opendisk(struct open_disk **odp, struct i386_devdesc *dev); > static void bd_closedisk(struct open_disk *od); > static int bd_bestslice(struct open_disk *od); >-static void bd_checkextended(struct open_disk *od, int slicenum); >+static void bd_checkextended(struct open_disk *od, int slicenum, int basenum); > > /* > * Translate between BIOS device numbers and our private unit numbers. >@@ -512,7 +512,7 @@ > sizeof(struct dos_partition) * NDOSPART); > od->od_nslices = 4; /* extended slices start here */ > for (i = 0; i < NDOSPART; i++) >- bd_checkextended(od, i); >+ bd_checkextended(od, i, i); > od->od_flags |= BD_PARTTABOK; > dptr = &od->od_slicetab[0]; > >@@ -624,12 +624,12 @@ > } > > static void >-bd_checkextended(struct open_disk *od, int slicenum) >+bd_checkextended(struct open_disk *od, int slicenum, int basenum) > { > char buf[BIOSDISK_SECSIZE]; > struct dos_partition *dp; > u_int base; >- int i, start, end; >+ int i, start; > > dp = &od->od_slicetab[slicenum]; > start = od->od_nslices; >@@ -651,17 +651,21 @@ > continue; > if (od->od_nslices == MAX_SLICES) > goto done; >- dp->dp_start += base; >- bcopy(dp, &od->od_slicetab[od->od_nslices], sizeof(*dp)); >- od->od_nslices++; >+ if (dp->dp_typ == DOSPTYP_EXT) { >+ dp->dp_start += od->od_slicetab[basenum].dp_start;; >+ bcopy(dp, &od->od_slicetab[od->od_nslices], sizeof(*dp)); >+ } else { >+ dp->dp_start += base; >+ bcopy(dp, &od->od_slicetab[od->od_nslices], sizeof(*dp)); >+ od->od_nslices++; >+ } > } >- end = od->od_nslices; > > /* > * now, recursively check the slices we just added > */ >- for (i = start; i < end; i++) >- bd_checkextended(od, i); >+ for (i = start; i < start + NDOSPART; i++) >+ bd_checkextended(od, i, basenum); > done: > return; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24997
: 13068