aboutsummaryrefslogtreecommitdiff
path: root/src/hw/blockcmd.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-07-11 12:09:57 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-27 19:02:16 -0400
commit04db972290a6f3c61920fc7498031f477911774e (patch)
tree61486505328ef8cb6abf6785da1db07982067551 /src/hw/blockcmd.c
parent5e9a6d5b03b8a7458b1f1d68d6e98f5de16f4e0b (diff)
downloadseabios-04db972290a6f3c61920fc7498031f477911774e.zip
seabios-04db972290a6f3c61920fc7498031f477911774e.tar.gz
seabios-04db972290a6f3c61920fc7498031f477911774e.tar.bz2
disk: Don't require the 'struct drive_s' to be in the f-segment
Allow the 'struct drive_s' drive description structure to be in either the "low" memory segment or the f-segment. Tested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/blockcmd.c')
-rw-r--r--src/hw/blockcmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c
index 98c06ce..f260dd8 100644
--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -5,10 +5,10 @@
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
-#include "biosvar.h" // GET_GLOBALFLAT
#include "block.h" // struct disk_op_s
#include "blockcmd.h" // struct cdb_request_sense
#include "byteorder.h" // be32_to_cpu
+#include "farptr.h" // GET_FLATPTR
#include "output.h" // dprintf
#include "std/disk.h" // DISK_RET_EPARAM
#include "string.h" // memset
@@ -117,7 +117,7 @@ scsi_fill_cmd(struct disk_op_s *op, void *cdbcmd, int maxcdb)
: CDB_CMD_WRITE_10);
cmd->lba = cpu_to_be32(op->lba);
cmd->count = cpu_to_be16(op->count);
- return GET_GLOBALFLAT(op->drive_gf->blksize);
+ return GET_FLATPTR(op->drive_gf->blksize);
case CMD_SCSI:
if (MODESEGMENT)
return -1;