:: commit eced64231df9be68117ecabdad4bb1713454749c

Itay Almog <itay2828@gmail.com> — 2021-09-03 08:12

parents: f59f18458c

Added test to makefile

diff --git a/Makefile b/Makefile
index d12b51c6..253ad82c 100644
--- a/Makefile
+++ b/Makefile
@@ -304,6 +304,28 @@ iso9660-test:
 	xorriso -as mkisofs -b boot/limine-cd.bin -no-emul-boot -boot-load-size 4 -boot-info-table test_image/ -o test.iso
 	qemu-system-x86_64 -net none -smp 4   -cdrom test.iso -debugcon stdio
 
+.PHONY: ntfs-test
+ntfs-test:
+	$(MAKE) test-clean
+	$(MAKE) test.hdd
+	$(MAKE) limine-bios
+	$(MAKE) bin/limine-install
+	$(MAKE) -C test
+	rm -rf test_image/
+	mkdir test_image
+	sudo losetup -Pf --show test.hdd > loopback_dev
+	sudo partprobe `cat loopback_dev`
+	sudo mkfs.ntfs `cat loopback_dev`p1
+	sudo mount `cat loopback_dev`p1 test_image
+	sudo mkdir test_image/boot
+	sudo cp -rv bin/* test/* test_image/boot/
+	sync
+	sudo umount test_image/
+	sudo losetup -d `cat loopback_dev`
+	rm -rf test_image loopback_dev
+	bin/limine-install test.hdd
+	qemu-system-x86_64 -net none -smp 4   -hda test.hdd -debugcon stdio
+
 .PHONY: full-hybrid-test
 full-hybrid-test:
 	$(MAKE) ovmf-x64
diff --git a/stage23/fs/ntfs.s2.c b/stage23/fs/ntfs.s2.c
index 4ce71f28..15e8ee10 100644
--- a/stage23/fs/ntfs.s2.c
+++ b/stage23/fs/ntfs.s2.c
@@ -53,9 +53,16 @@ int ntfs_check_signature(struct volume *part) {
 }
 
 int ntfs_open(struct ntfs_file_handle *ret, struct volume *part, const char *path) {
-
+    (void)ret;
+    (void)part;
+    (void)path;
+    return 1;
 }
 
 int ntfs_read(struct ntfs_file_handle *file, void *buf, uint64_t loc, uint64_t count) {
-
+    (void)file;
+    (void)buf;
+    (void)loc;
+    (void)count;
+    return 1;
 }
tab: 248 wrap: offon