disk/prep: if no 9fat, reserve space for plan9 partition table in autopart (thanks Shamar)
usually, the plan9 partition table is contained in the first 9fat partition after the pbs/fat header, but when no 9fat partition is requested, we have to make sure partitions wont overlap the partition table (start at sector offset >= 2).
This commit is contained in:
parent
49cd794fbd
commit
677dd90b02
1 changed files with 5 additions and 0 deletions
|
@ -432,6 +432,11 @@ autoxpart(Edit *edit)
|
|||
}
|
||||
|
||||
s = 0;
|
||||
if(autox[0].alloc == 0){
|
||||
/* if no 9fat, reserve space for plan9 partition table */
|
||||
s = 2;
|
||||
if((s + pa) % stride) s += stride - (s + pa) % stride;
|
||||
}
|
||||
secs = edit->disk->secs;
|
||||
for(i=0; i<nelem(autox); i++){
|
||||
if(autox[i].alloc == 0)
|
||||
|
|
Loading…
Reference in a new issue