Home
last modified time | relevance | path

Searched refs:mode (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS-0.1.8/user/libs/libc/src/
Dstdio.c68 FILE *fopen(const char *restrict pathname, const char *restrict mode) in fopen() argument
74 if (strcmp(mode, "r") == 0) in fopen()
76 else if (strcmp(mode, "r+") == 0) in fopen()
78 else if (strcmp(mode, "w") == 0) in fopen()
80 else if (strcmp(mode, "w+") == 0) in fopen()
82 else if (strcmp(mode, "a") == 0) in fopen()
84 else if (strcmp(mode, "a+") == 0) in fopen()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dfile.rs93 mode: FileMode, field
106 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new()
111 mode, in new()
117 f.inode.open(&mut f.private_data, &mode)?; in new()
225 if self.mode == FileMode::O_WRONLY { in readable()
236 if self.mode == FileMode::O_RDONLY { in writeable()
299 mode: self.mode.clone(), in try_clone()
305 if self.inode.open(&mut res.private_data, &res.mode).is_err() { in try_clone()
320 pub fn mode(&self) -> FileMode { in mode() method
321 return self.mode; in mode()
[all …]
Dsyscall.rs71 mode: ModeType, field
98 mode: ModeType { bits: 0 }, in new()
129 pub fn open(path: &str, mode: FileMode) -> Result<usize, SystemError> { in open()
141 if mode.contains(FileMode::O_CREAT) in open()
142 && !mode.contains(FileMode::O_DIRECTORY) in open()
163 if mode.contains(FileMode::O_DIRECTORY) && file_type != FileType::Dir { in open()
168 if mode.contains(FileMode::O_TRUNC) in open()
169 && (mode.contains(FileMode::O_RDWR) || mode.contains(FileMode::O_WRONLY)) in open()
176 let mut file: File = File::new(inode, mode)?; in open()
179 if mode.contains(FileMode::O_APPEND) { in open()
[all …]
DVFS.h93 #define vfs_file_can_read(file) (((file)->mode) & VFS_FILE_MODE_READ)
94 #define vfs_file_can_write(file) (((file)->mode) & VFS_FILE_MODE_WRITE)
95 #define vfs_file_can_rw(file) ((((file)->mode) & VFS_FILE_MODE_RW) == VFS_FILE_MODE_RW)
104 uint64_t mode; member
139 …ng (*create)(struct vfs_index_node_t *parent_inode, struct vfs_dir_entry_t *dest_dEntry, int mode);
153 long (*mkdir)(struct vfs_index_node_t *inode, struct vfs_dir_entry_t *dEntry, int mode);
Dmount.rs126 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
127 return self.inner_inode.open(data, mode); in open()
138 mode: u32, in create_with_data()
143 .create_with_data(name, file_type, mode, data); in create_with_data()
205 mode: u32, in create()
208 inner_inode: self.inner_inode.create(name, file_type, mode)?, in create()
Dmod.rs188 mode: u32, in create()
191 return self.create_with_data(name, file_type, mode, 0); in create()
480 pub mode: u32, field
507 mode: 0, in default()
554 pub fn new(file_type: FileType, mode: u32) -> Self { in new()
565 mode, in new()
/DragonOS-0.1.8/user/libs/libc/src/sys/
Dstat.c4 int mkdir(const char *path, mode_t mode) in mkdir() argument
6 return syscall_invoke(SYS_MKDIR, (uint64_t)path, (uint64_t)mode, 0, 0, 0, 0, 0, 0); in mkdir()
/DragonOS-0.1.8/user/libs/libc/src/include/export/
Ddirent.h35 #define S_DT(mode) (((mode) & S_IFMT) >> S_DT_SHIFT) argument
Dstdio.h56 FILE *fopen(const char *restrict pathname, const char *restrict mode);
/DragonOS-0.1.8/
Dbochsrc8 # ata0-master: type=disk, path="/data/home/longjin/code/hd.img", mode=flat
14 ata0-master: type=disk, path="bin/disk.img", mode=flat
45 speaker: enabled=1, mode=system
48 com1: enabled=1, mode=null
/DragonOS-0.1.8/tools/
Dlist_contributors.py25 if args.mode == 'all':
27 elif args.mode == 'short':
D.gdbinit3 set follow-fork-mode child
Dconfigure_network.sh11 sudo ip tuntap add name tap0 mode tap user $USER
/DragonOS-0.1.8/kernel/src/driver/interrupt/apic/
Dapic_timer.h49 static __always_inline void apic_timer_set_LVT(uint32_t vector, uint32_t mask, uint32_t mode) in apic_timer_set_LVT() argument
51 register uint32_t val = (mode << 17) | vector | (mask ? (APIC_LVT_INT_MASKED) : 0); in apic_timer_set_LVT()
/DragonOS-0.1.8/user/libs/libc/src/include/export/sys/
Dstat.h19 int mkdir(const char *path, mode_t mode);
/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dnull_dev.rs46 mode: 0o666, in new()
97 inode.metadata.mode = metadata.mode; in set_metadata()
Dzero_dev.rs46 mode: 0o666, in new()
97 inode.metadata.mode = metadata.mode; in set_metadata()
Dmod.rs236 mode: mode_, in new_with_parent()
320 mode: _mode, in do_create_with_data()
359 mode: u32, in create_with_data()
365 return self.do_create_with_data(guard, name, file_type, mode, data); in create_with_data()
452 inode.metadata.mode = metadata.mode; in set_metadata()
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs52 mode: 0o666, in new()
103 inode.metadata.mode = metadata.mode; in set_metadata()
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs62 mode: 0o666, in new()
165 inode.metadata.mode = metadata.mode; in set_metadata()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs93 mode: 0o777, in new()
213 inode.metadata.mode = metadata.mode; in set_metadata()
234 mode: u32, in create_with_data()
264 mode: mode, in create_with_data()
/DragonOS-0.1.8/kernel/src/libs/
Dlockref.rs50 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop()
67 match mode { in cmpxchg_loop()
120 fn cmpxchg_loop(&mut self, mode: CmpxchgMode) -> Result<i32, i32> { in cmpxchg_loop()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs120 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open()
124 let accmode = mode.accmode(); in open()
128 if mode.contains(FileMode::O_SYNC) { in open()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs255 mode: 0o777, in new()
454 inode.metadata.mode = metadata.mode; in set_metadata()
475 mode: u32, in create_with_data()
506 mode: mode, in create_with_data()
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dmod.rs317 mode: _mode, in do_create_with_data()
439 mode: mode_, in new_with_parent()

12