mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
feat:添加symlink系统调用 (#984)
* 添加symlink系统调用 * 修改FATInode的dname的获取逻辑 * 修改fat对Dname的处理,分离dname和inode缓存的key --------- Co-authored-by: sparkzky <sparkhhhhhhhhh@outlook.com> Co-authored-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
use core::ffi::{c_char, c_void};
|
||||
use errno::errno;
|
||||
use libc::{mount, MS_BIND};
|
||||
use std::fs;
|
||||
use std::path::Path;
|
||||
use std::time;
|
||||
|
||||
fn main() {
|
||||
let path = Path::new("mnt/tmp");
|
||||
let dir = fs::create_dir_all(path);
|
||||
@ -26,7 +28,8 @@ fn main() {
|
||||
if result == 0 {
|
||||
println!("Mount successful");
|
||||
} else {
|
||||
println!("Mount failed");
|
||||
let err = errno();
|
||||
println!("Mount failed with error code: {}", err.0);
|
||||
}
|
||||
let dur = clock.elapsed();
|
||||
println!("mount costing time: {} ns", dur.as_nanos());
|
||||
|
Reference in New Issue
Block a user