Skip to content

Commit 92d878c

Browse files
author
Jiajie Chen
committed
Correctly report rdev of device nodes
1 parent 287e48a commit 92d878c

File tree

5 files changed

+33
-28
lines changed

5 files changed

+33
-28
lines changed

kernel/Cargo.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kernel/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ smoltcp = { git = "https://github.com/rcore-os/smoltcp", default-features = fals
6565
bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator" }
6666
rcore-memory = { path = "../crate/memory" }
6767
rcore-thread = { git = "https://github.com/rcore-os/rcore-thread" }
68-
rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "22c759f4" }
69-
rcore-fs-sfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "22c759f4" }
70-
rcore-fs-ramfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "22c759f4" }
71-
rcore-fs-mountfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "22c759f4" }
72-
rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "22c759f4" }
68+
rcore-fs = { git = "https://github.com/rcore-os/rcore-fs", rev = "b7f7d9e" }
69+
rcore-fs-sfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "b7f7d9e" }
70+
rcore-fs-ramfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "b7f7d9e" }
71+
rcore-fs-mountfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "b7f7d9e" }
72+
rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "b7f7d9e" }
7373
compression = { version = "0.1.4", default-features = false, features = ["gzip"] }
7474

7575

kernel/src/arch/x86_64/acpi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::arch::consts::PHYSICAL_MEMORY_OFFSET;
2+
use crate::memory::phys_to_virt;
23
use acpi::{search_for_rsdp_bios, AcpiHandler, PhysicalMapping};
34
use core::ptr::NonNull;
4-
use crate::memory::phys_to_virt;
55
use core::slice;
66

77
struct Handler;

kernel/src/process/structs.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,12 @@ trait ElfExt {
452452

453453
/// Append current ELF file as interpreter into given memory set.
454454
/// This will insert the interpreter it a place which is "good enough" (since ld.so should be PIC).
455-
fn append_as_interpreter(&self, inode: &Arc<dyn INode>, memory_set: &mut MemorySet, bias: usize);
455+
fn append_as_interpreter(
456+
&self,
457+
inode: &Arc<dyn INode>,
458+
memory_set: &mut MemorySet,
459+
bias: usize,
460+
);
456461

457462
/// Get virtual address of PHDR section if it has.
458463
fn get_phdr_vaddr(&self) -> Option<u64>;

kernel/src/syscall/fs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1295,7 +1295,7 @@ impl From<Metadata> for Stat {
12951295
nlink: info.nlinks as u64,
12961296
uid: info.uid as u32,
12971297
gid: info.gid as u32,
1298-
rdev: 0,
1298+
rdev: info.rdev as u64,
12991299
size: info.size as u64,
13001300
blksize: info.blk_size as u64,
13011301
blocks: info.blocks as u64,

0 commit comments

Comments
 (0)