Change license from GPLv3 to LGPLv3.
[seabios.git] / src / floppy.c
index 6354bd8bd37e6e62381354884036b56170b7d7f1..6214acba21ea2d083bb646b65fd476e7342915b3 100644 (file)
@@ -3,7 +3,7 @@
 // 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 "types.h" // u8
 #include "disk.h" // DISK_RET_SUCCESS
@@ -20,7 +20,7 @@
 // Since no provisions are made for multiple drive types, most
 // values in this table are ignored.  I set parameters for 1.44M
 // floppy here
-struct floppy_ext_dbt_s diskette_param_table2 VAR16 = {
+struct floppy_ext_dbt_s diskette_param_table2 VAR16_32 = {
     .dbt = {
         .specify1       = 0xAF,
         .specify2       = 0x02, // head load time 0000001, DMA used
@@ -188,15 +188,16 @@ floppy_pio(u8 *cmd, u8 cmdlen)
     return 0;
 }
 
-#define floppy_ret(regs, code) \
-    __floppy_ret(__func__, __LINE__, (regs), (code))
+#define floppy_ret(regs, code)                                  \
+    __floppy_ret((regs), (code) | (__LINE__ << 8), __func__)
 
 void
-__floppy_ret(const char *fname, int lineno, struct bregs *regs, u8 code)
+__floppy_ret(struct bregs *regs, u32 linecode, const char *fname)
 {
+    u8 code = linecode;
     SET_BDA(floppy_last_status, code);
     if (code)
-        __set_code_fail(fname, lineno, regs, code);
+        __set_code_fail(regs, linecode, fname);
     else
         set_code_success(regs);
 }