summaryrefslogtreecommitdiffstats
path: root/sys/sys/diskpc98.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2013-08-07 00:00:48 +0000
committermarcel <marcel@FreeBSD.org>2013-08-07 00:00:48 +0000
commit9f2f2e171a6de4c6d713a50366f3572946665fb5 (patch)
treeb8704cff2de99c4cf2da972288c8d1271ec33598 /sys/sys/diskpc98.h
parentf5fd32bca5d6cadbe86d031375653c183adce356 (diff)
downloadFreeBSD-src-9f2f2e171a6de4c6d713a50366f3572946665fb5.zip
FreeBSD-src-9f2f2e171a6de4c6d713a50366f3572946665fb5.tar.gz
Change <sys/diskpc98.h> to not redefine the same symbols that are
being defined in <sys/diskmbr.h>. Instead give the symbols here a "PC98_" prefix. This way, both <sys/diskmbr.h> and <sys/diskpc98.h> can be included in the same C source file. The renaming is trivial. The only gotcha is that DOSBBSECTOR is also redefined from 0 to 1. This because DOSBBSECTOR was always used in conjunction with an addition of 1. The PC98_BBSECTOR symbol is defined as 1 and the expression is simplified. Note: it is not believed that ports are seriously impacted; or at all for that matter. Approved by: nyan@
Diffstat (limited to 'sys/sys/diskpc98.h')
-rw-r--r--sys/sys/diskpc98.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index 66bda90..aa0bb0a 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -35,15 +35,12 @@
#include <sys/ioccom.h>
-#define DOSBBSECTOR 0 /* DOS boot block relative sector number */
-#undef DOSPARTOFF
-#define DOSPARTOFF 0
-#undef DOSPARTSIZE
-#define DOSPARTSIZE 32
-#undef NDOSPART
-#define NDOSPART 16
-#define DOSMAGICOFFSET 510
-#define DOSMAGIC 0xAA55
+#define PC98_BBSECTOR 1 /* DOS boot block relative sector number */
+#define PC98_PARTOFF 0
+#define PC98_PARTSIZE 32
+#define PC98_NPARTS 16
+#define PC98_MAGICOFS 510
+#define PC98_MAGIC 0xAA55
#define PC98_MID_BOOTABLE 0x80
#define PC98_MID_MASK 0x7f
@@ -55,8 +52,7 @@
#define DOSMID_386BSD (PC98_MID_386BSD | PC98_MID_BOOTABLE)
#define DOSSID_386BSD (PC98_SID_386BSD | PC98_SID_ACTIVE)
-#undef DOSPTYP_386BSD
-#define DOSPTYP_386BSD (DOSSID_386BSD << 8 | DOSMID_386BSD)
+#define PC98_PTYP_386BSD (DOSSID_386BSD << 8 | DOSMID_386BSD)
struct pc98_partition {
unsigned char dp_mid;
@@ -75,7 +71,7 @@ struct pc98_partition {
unsigned char dp_name[16];
};
#ifdef CTASSERT
-CTASSERT(sizeof (struct pc98_partition) == DOSPARTSIZE);
+CTASSERT(sizeof (struct pc98_partition) == PC98_PARTSIZE);
#endif
void pc98_partition_dec(void const *pp, struct pc98_partition *d);
OpenPOWER on IntegriCloud