aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-05 01:04:50 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-07-05 01:04:50 -0700
commit46a81bae932b3f84c5e76dc3c2a10e3d2d090fbb (patch)
tree1b4b5b269e55d31de755ef7c329ce17a90e973a8
parentb1deeb181382bad22846f9c467b64fbda6665e8f (diff)
downloadpxelinux-46a81bae932b3f84c5e76dc3c2a10e3d2d090fbb.tar.gz
pxelinux-46a81bae932b3f84c5e76dc3c2a10e3d2d090fbb.tar.xz
pxelinux-46a81bae932b3f84c5e76dc3c2a10e3d2d090fbb.zip
dosutil: update mdiskchk, add Makefile
Update mdiskchk and add a Makefile. Note that since this needs OpenWatcom to compile, we still check in the binary file (which is quite small, anyway.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--dosutil/.gitignore1
-rw-r--r--dosutil/Makefile18
-rw-r--r--dosutil/mdiskchk.c39
-rwxr-xr-xdosutil/mdiskchk.combin9680 -> 7273 bytes
4 files changed, 38 insertions, 20 deletions
diff --git a/dosutil/.gitignore b/dosutil/.gitignore
new file mode 100644
index 00000000..0aec5f2f
--- /dev/null
+++ b/dosutil/.gitignore
@@ -0,0 +1 @@
+!mdiskchk.com
diff --git a/dosutil/Makefile b/dosutil/Makefile
new file mode 100644
index 00000000..6a11f51c
--- /dev/null
+++ b/dosutil/Makefile
@@ -0,0 +1,18 @@
+#
+# OpenWatcom compile and link utility
+#
+WCL = wcl
+WCLOPT_DOSCOM = -3 -osx -mt -bt=DOS -l=COM
+
+UPX = upx
+
+%.com: %.c
+ $(WCL) $(WCLOPT_DOSCOM) -fe=$@ $<
+ $(UPX) --ultra-brute --lzma $@ || \
+ $(UPX) --ultra-brute $@ || \
+ true
+
+all: mdiskchk.com
+
+clean:
+ rm -f *.o *.obj *.com *.sys
diff --git a/dosutil/mdiskchk.c b/dosutil/mdiskchk.c
index eec5be40..42aa5119 100644
--- a/dosutil/mdiskchk.c
+++ b/dosutil/mdiskchk.c
@@ -58,12 +58,12 @@ struct memdiskinfo *query_memdisk(int drive)
__asm {
.386;
- mov eax, 454 d0800h;
- mov ecx, 444 d0000h;
- mov edx, 53490000 h;
+ mov eax, 454d0800h;
+ mov ecx, 444d0000h;
+ mov edx, 53490000h;
mov dl, _dl;
- mov ebx, 3f 4 b0000h;
- int 13 h;
+ mov ebx, 3f4b0000h;
+ int 13h;
mov _eax, eax;
mov _ecx, ecx;
mov _edx, edx;
@@ -99,21 +99,20 @@ const char *bootloadername(uint8_t id)
uint8_t id, mask;
const char *name;
} *lp, list[] = {
- {
- 0x00, 0xf0, "LILO"}, {
- 0x10, 0xf0, "LOADLIN"}, {
- 0x31, 0xff, "SYSLINUX"}, {
- 0x32, 0xff, "PXELINUX"}, {
- 0x33, 0xff, "ISOLINUX"}, {
- 0x34, 0xff, "EXTLINUX"}, {
- 0x30, 0xf0, "SYSLINUX family"}, {
- 0x40, 0xf0, "Etherboot"}, {
- 0x50, 0xf0, "ELILO"}, {
- 0x70, 0xf0, "GrUB"}, {
- 0x80, 0xf0, "U-Boot"}, {
- 0xA0, 0xf0, "Gujin"}, {
- 0xB0, 0xf0, "Qemu"}, {
- 0x00, 0x00, "unknown"}
+ {0x00, 0xf0, "LILO"},
+ {0x10, 0xf0, "LOADLIN"},
+ {0x31, 0xff, "SYSLINUX"},
+ {0x32, 0xff, "PXELINUX"},
+ {0x33, 0xff, "ISOLINUX"},
+ {0x34, 0xff, "EXTLINUX"},
+ {0x30, 0xf0, "SYSLINUX family"},
+ {0x40, 0xf0, "Etherboot"},
+ {0x50, 0xf0, "ELILO"},
+ {0x70, 0xf0, "GrUB"},
+ {0x80, 0xf0, "U-Boot"},
+ {0xA0, 0xf0, "Gujin"},
+ {0xB0, 0xf0, "Qemu"},
+ {0x00, 0x00, "unknown"}
};
for (lp = list;; lp++) {
diff --git a/dosutil/mdiskchk.com b/dosutil/mdiskchk.com
index 07e1471b..78257519 100755
--- a/dosutil/mdiskchk.com
+++ b/dosutil/mdiskchk.com
Binary files differ