aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 09:48:09 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-04-21 09:48:09 -0700
commit075c25456b7c6f33248e8bcbe7ede17cf5e82781 (patch)
treeb319c89af3b0f0ffa66af95507d4b7eb9762bbcf /com32
parent2290905867306b623d69068b2d2312a9bbfcefb2 (diff)
downloadsyslinux-075c25456b7c6f33248e8bcbe7ede17cf5e82781.tar.gz
syslinux-075c25456b7c6f33248e8bcbe7ede17cf5e82781.tar.xz
syslinux-075c25456b7c6f33248e8bcbe7ede17cf5e82781.zip
gpllib: Add disk/common.h for shared definitions
A couple of structures/definitions are shared between several files in the disk library. Add them in disk/common.h Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32')
-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>
/**