Merge branch 'no-mounted-qemu' into 'master'

Prevent running QEMU if disk mounted

Closes #1811

See merge request redox-os/redox!2133
This commit is contained in:
Jeremy Soller 2026-05-08 08:35:14 -06:00
commit 0801c2cc82
2 changed files with 12 additions and 2 deletions

View File

@ -94,8 +94,12 @@ ifeq ($(FSTOOLS_IN_PODMAN),1)
$(PODMAN_RUN) make $@
else
@sync
-$(FUMOUNT) $(MOUNT_DIR)
ifneq ($(wildcard $(MOUNT_DIR)),)
$(FUMOUNT) $(MOUNT_DIR)
@rm -rf $(MOUNT_DIR)
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
@echo "\033[1;36;49mFilesystem unmounted\033[0m"
else
@echo "\033[1;36;49mDisk is not mounted\033[0m"
endif
@-$(FUMOUNT) /tmp/redox_installer 2>/dev/null || true
endif

View File

@ -375,4 +375,10 @@ $(BUILD)/qemu_uboot.rom:
wget -O $@ https://gitlab.redox-os.org/Ivan/redox_firmware/-/raw/main/platform/qemu/qemu_arm64/u-boot-qemu-arm64.bin
qemu: qemu-deps
ifeq ($(wildcard $(MOUNT_DIR)),)
$(QEMU) $(QEMUFLAGS)
else
@echo "\033[1;38;5;196mDisk is mounted. Unmounting the disk...\033[0m";
$(MAKE) unmount
$(QEMU) $(QEMUFLAGS)
endif