diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index e8ba981..aa429ce 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -63,6 +63,7 @@ minimum-image-size = 0 # The minimum output file size (in MiB) # (the "{}" will be replaced with the path to the bootable disk image) run-command = ["qemu-system-x86_64", "-drive", "format=raw,file={}", + # TODO: use SFSIMG environment variable "-drive", "format=raw,file=../user/img/ucore-i386-pic.img,media=disk,cache=writeback", "-serial", "mon:stdio", "-device", "isa-debug-exit", diff --git a/kernel/Makefile b/kernel/Makefile index beaee8a..87668a4 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -48,7 +48,7 @@ qemu_opts := \ ifeq ($(arch), x86_64) qemu_opts += \ -drive format=raw,file=$(bootimage) \ - -drive format=raw,file="../user/img/ucore-i386-pic.img",media=disk,cache=writeback \ + -drive format=raw,file=$(SFSIMG),media=disk,cache=writeback \ -serial mon:stdio \ -device isa-debug-exit diff --git a/user/ucore-ulib/src/lang_items.rs b/user/ucore-ulib/src/lang_items.rs index 4fd3ed2..e1e58d8 100644 --- a/user/ucore-ulib/src/lang_items.rs +++ b/user/ucore-ulib/src/lang_items.rs @@ -1,5 +1,5 @@ -use syscall::{sys_close, sys_dup, sys_exit, sys_open}; -use syscall::{O_RDONLY, O_WRONLY}; +use crate::syscall::{sys_close, sys_dup, sys_exit, sys_open}; +use crate::syscall::{O_RDONLY, O_WRONLY}; use core::alloc::Layout; use core::panic::PanicInfo;