aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/gplinclude/disk/common.h19
-rw-r--r--com32/gplinclude/disk/geom.h10
-rw-r--r--com32/gpllib/disk/read.c3
-rw-r--r--com32/gpllib/disk/write.c2
4 files changed, 22 insertions, 12 deletions
diff --git a/com32/gplinclude/disk/common.h b/com32/gplinclude/disk/common.h
new file mode 100644
index 00000000..6e4f3d61
--- /dev/null
+++ b/com32/gplinclude/disk/common.h
@@ -0,0 +1,19 @@
+#ifndef _COMMON_H_
+#define _COMMON_H_
+
+#include <stdint.h>
+
+#define SECTOR 512 /* bytes/sector */
+
+#undef PAGE_SIZE
+#define PAGE_SIZE (1<<12)
+
+struct ebios_dapa {
+ uint16_t len;
+ uint16_t count;
+ uint16_t off;
+ uint16_t seg;
+ uint64_t lba;
+};
+
+#endif /* _COMMON_H_ */
diff --git a/com32/gplinclude/disk/geom.h b/com32/gplinclude/disk/geom.h
index f0c5b6dd..30dc86bf 100644
--- a/com32/gplinclude/disk/geom.h
+++ b/com32/gplinclude/disk/geom.h
@@ -3,16 +3,6 @@
#include <stdint.h>
-#define SECTOR 512 /* bytes/sector */
-
-struct ebios_dapa {
- uint16_t len;
- uint16_t count;
- uint16_t off;
- uint16_t seg;
- uint64_t lba;
-};
-
/**
* INT 13 Extensions
*
diff --git a/com32/gpllib/disk/read.c b/com32/gpllib/disk/read.c
index 92b2563f..de4dee9f 100644
--- a/com32/gpllib/disk/read.c
+++ b/com32/gpllib/disk/read.c
@@ -2,8 +2,9 @@
#include <stdlib.h>
#include <string.h>
#include <disk/geom.h>
-#include <disk/util.h>
#include <disk/read.h>
+#include <disk/util.h>
+#include <disk/common.h>
/**
* read_mbr - return a pointer to a malloced buffer containing the mbr
diff --git a/com32/gpllib/disk/write.c b/com32/gpllib/disk/write.c
index 4b1ed702..100f3aab 100644
--- a/com32/gpllib/disk/write.c
+++ b/com32/gpllib/disk/write.c
@@ -1,9 +1,9 @@
#include <com32.h>
#include <stdlib.h>
#include <string.h>
-#include <disk/geom.h>
#include <disk/read.h>
#include <disk/write.h>
+#include <disk/common.h>
#include <disk/util.h>
/**