// Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net>
// Copyright (C) 2002 MandrakeSoft S.A.
//
-// This file may be distributed under the terms of the GNU GPLv3 license.
+// This file may be distributed under the terms of the GNU LGPLv3 license.
#include "disk.h" // floppy_13
#include "biosvar.h" // SET_BDA
****************************************************************/
void
-__disk_ret(const char *fname, int lineno, struct bregs *regs, u8 code)
+__disk_ret(struct bregs *regs, u32 linecode, const char *fname)
{
+ u8 code = linecode;
SET_BDA(disk_last_status, code);
if (code)
- __set_code_fail(fname, lineno, regs, code);
+ __set_code_fail(regs, linecode, fname);
else
set_code_success(regs);
}
static void
-__disk_stub(const char *fname, int lineno, struct bregs *regs)
+__disk_stub(struct bregs *regs, int lineno, const char *fname)
{
- __debug_stub(fname, lineno, regs);
- __disk_ret(fname, lineno, regs, DISK_RET_SUCCESS);
+ __debug_stub(regs, lineno, fname);
+ __disk_ret(regs, DISK_RET_SUCCESS | (lineno << 8), fname);
}
-#define DISK_STUB(regs) \
- __disk_stub(__func__, __LINE__, (regs))
+#define DISK_STUB(regs) \
+ __disk_stub((regs), __LINE__, __func__)
static int
__send_disk_op(struct disk_op_s *op_p, u16 op_s)
SET_BDA(disk_interrupt_flag, 0xff);
eoi_pic2();
}
+
+// Old Fixed Disk Parameter Table (newer tables are in the ebda).
+struct fdpt_s OldFDPT VAR16FIXED(0xe401);