|
Lines 132-138
Link Here
|
| 132 |
#else |
132 |
#else |
| 133 |
p = read_block(fd, 0, sector_size); |
133 |
p = read_block(fd, 0, sector_size); |
| 134 |
dp = (struct dos_partition*)(p + DOSPARTOFF); |
134 |
dp = (struct dos_partition*)(p + DOSPARTOFF); |
| 135 |
for (i = 0; i < NDOSPART; i++) { |
135 |
for (i = 0; i < NDOSPART; i++, dp++) { |
| 136 |
if (Read_Int32(&dp->dp_start) >= size) |
136 |
if (Read_Int32(&dp->dp_start) >= size) |
| 137 |
continue; |
137 |
continue; |
| 138 |
if (Read_Int32(&dp->dp_start) + Read_Int32(&dp->dp_size) >= size) |
138 |
if (Read_Int32(&dp->dp_start) + Read_Int32(&dp->dp_size) >= size) |
|
Lines 144-152
Link Here
|
| 144 |
d->flags |= DISK_ON_TRACK; |
144 |
d->flags |= DISK_ON_TRACK; |
| 145 |
offset = 63; |
145 |
offset = 63; |
| 146 |
} |
146 |
} |
| 147 |
|
|
|
| 148 |
} |
147 |
} |
| 149 |
free(p); |
|
|
| 150 |
#endif |
148 |
#endif |
| 151 |
|
149 |
|
| 152 |
d->bios_sect = dl.d_nsectors; |
150 |
d->bios_sect = dl.d_nsectors; |
|
Lines 178-188
Link Here
|
| 178 |
(*(p+1) == 0xff) && |
176 |
(*(p+1) == 0xff) && |
| 179 |
(*(p+2) == 0xff)) { |
177 |
(*(p+2) == 0xff)) { |
| 180 |
Add_Chunk(d, 0, size, name, fat, 0xa0a0, 0, name); |
178 |
Add_Chunk(d, 0, size, name, fat, 0xa0a0, 0, name); |
| 181 |
free(p); |
|
|
| 182 |
goto pc98_mo_done; |
179 |
goto pc98_mo_done; |
| 183 |
} |
180 |
} |
| 184 |
free(p); |
|
|
| 185 |
#endif /* PC98 */ |
181 |
#endif /* PC98 */ |
|
|
182 |
dp = (struct dos_partition*)(p + DOSPARTOFF); |
| 186 |
for(i=BASE_SLICE;i<ds.dss_nslices;i++) { |
183 |
for(i=BASE_SLICE;i<ds.dss_nslices;i++) { |
| 187 |
char sname[20]; |
184 |
char sname[20]; |
| 188 |
chunk_e ce; |
185 |
chunk_e ce; |
|
Lines 230-235
Link Here
|
| 230 |
ce = unknown; |
227 |
ce = unknown; |
| 231 |
break; |
228 |
break; |
| 232 |
} |
229 |
} |
|
|
230 |
if (i-BASE_SLICE < NDOSPART && |
| 231 |
dp[i-BASE_SLICE].dp_flag == 0x80) |
| 232 |
flags |= CHUNK_ACTIVE; |
| 233 |
#ifdef PC98 |
233 |
#ifdef PC98 |
| 234 |
if (Add_Chunk(d, ds.dss_slices[i].ds_offset, |
234 |
if (Add_Chunk(d, ds.dss_slices[i].ds_offset, |
| 235 |
ds.dss_slices[i].ds_size, sname, ce, subtype, flags, |
235 |
ds.dss_slices[i].ds_size, sname, ce, subtype, flags, |
|
Lines 377-382
Link Here
|
| 377 |
#ifdef PC98 |
377 |
#ifdef PC98 |
| 378 |
pc98_mo_done: |
378 |
pc98_mo_done: |
| 379 |
#endif |
379 |
#endif |
|
|
380 |
free(p); |
| 380 |
close(fd); |
381 |
close(fd); |
| 381 |
Fixup_Names(d); |
382 |
Fixup_Names(d); |
| 382 |
return d; |
383 |
return d; |