From d5a6eb2020658b3dd1c4825032397053f89295ea Mon Sep 17 00:00:00 2001 From: equation314 Date: Mon, 3 Dec 2018 12:30:03 +0800 Subject: [PATCH] user: fix build error --- kernel/Cargo.toml | 1 + kernel/Makefile | 2 +- user/ucore-ulib/src/lang_items.rs | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index e8ba9814..aa429ce7 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 beaee8a0..87668a4a 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 4fd3ed24..e1e58d8a 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;