|
@@ -207,9 +207,13 @@ static int int13_get_parameters ( struct int13_drive *drive,
|
207
|
207
|
*/
|
208
|
208
|
static int int13_get_disk_type ( struct int13_drive *drive,
|
209
|
209
|
struct i386_all_regs *ix86 ) {
|
|
210
|
+ uint32_t blocks;
|
|
211
|
+
|
210
|
212
|
DBG ( "Get disk type\n" );
|
211
|
|
- ix86->regs.cx = ( drive->cylinders >> 16 );
|
212
|
|
- ix86->regs.dx = ( drive->cylinders & 0xffff );
|
|
213
|
+ blocks = ( ( drive->blockdev->blocks <= 0xffffffffUL ) ?
|
|
214
|
+ drive->blockdev->blocks : 0xffffffffUL );
|
|
215
|
+ ix86->regs.cx = ( blocks >> 16 );
|
|
216
|
+ ix86->regs.dx = ( blocks & 0xffff );
|
213
|
217
|
return INT13_DISK_TYPE_HDD;
|
214
|
218
|
}
|
215
|
219
|
|