Home
last modified time | relevance | path

Searched defs:SystemError (Results 1 – 25 of 175) sorted by relevance

1234567

/DragonOS-0.1.9/kernel/src/arch/riscv64/interrupt/
Dhandle.rs67 fn default_handler(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in default_handler() argument
75 fn do_trap_insn_misaligned(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_insn_misaligned() argument
83 fn do_trap_insn_access_fault(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_insn_access_fault() argument
91 fn do_trap_insn_illegal(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_insn_illegal() argument
99 fn do_trap_break(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_break() argument
107 fn do_trap_load_misaligned(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_load_misaligned() argument
115 fn do_trap_load_access_fault(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_load_access_fault() argument
123 fn do_trap_store_misaligned(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_store_misaligned() argument
131 fn do_trap_store_access_fault(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_store_access_fault() argument
139 fn do_trap_user_env_call(_trap_frame: &mut TrapFrame) -> Result<(), SystemError> { in do_trap_user_env_call() argument
[all …]
/DragonOS-0.1.9/kernel/src/libs/
Dvec_cursor.rs46 pub fn read_u8(&mut self) -> Result<u8, SystemError> { in read_u8() argument
55 pub fn read_u16(&mut self) -> Result<u16, SystemError> { in read_u16() argument
69 pub fn read_u32(&mut self) -> Result<u32, SystemError> { in read_u32() argument
83 pub fn read_u64(&mut self) -> Result<u64, SystemError> { in read_u64() argument
102 pub fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), SystemError> { in read_exact() argument
114 pub fn read_u16_into(&mut self, buf: &mut [u16]) -> Result<(), SystemError> { in read_u16_into() argument
132 pub fn seek(&mut self, origin: SeekFrom) -> Result<usize, SystemError> { in seek() argument
158 pub fn write_u8(&mut self, value: u8) -> Result<u8, SystemError> { in write_u8() argument
170 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16() argument
184 pub fn write_u32(&mut self, value: u32) -> Result<u32, SystemError> { in write_u32() argument
[all …]
/DragonOS-0.1.9/kernel/src/syscall/
Duser_access.rs28 pub unsafe fn clear_user(dest: VirtAddr, len: usize) -> Result<usize, SystemError> { in clear_user() argument
37 pub unsafe fn copy_to_user(dest: VirtAddr, src: &[u8]) -> Result<usize, SystemError> { in copy_to_user() argument
47 pub unsafe fn copy_from_user(dst: &mut [u8], src: VirtAddr) -> Result<usize, SystemError> { in copy_from_user() argument
76 ) -> Result<String, SystemError> { in check_and_clone_cstr() argument
115 pub fn check_and_clone_cstr_array(user: *const *const u8) -> Result<Vec<String>, SystemError> { in check_and_clone_cstr_array() argument
166 pub fn new<U>(addr: *const U, len: usize, from_user: bool) -> Result<Self, SystemError> { in new() argument
184 pub fn read_from_user<T>(&self, offset: usize) -> Result<&[T], SystemError> { in read_from_user() argument
192 pub fn read_one_from_user<T>(&self, offset: usize) -> Result<&T, SystemError> { in read_one_from_user() argument
205 ) -> Result<usize, SystemError> { in copy_from_user() argument
220 ) -> Result<(), SystemError> { in copy_one_from_user() argument
[all …]
/DragonOS-0.1.9/kernel/src/driver/input/serio/
Dserio_device.rs23 fn write(&self, device: &Arc<dyn SerioDevice>, data: u8) -> Result<(), SystemError>; in write() argument
25 fn open(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in open() argument
27 fn close(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in close() argument
29 fn start(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in start() argument
31 fn stop(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in stop() argument
50 pub fn register_port(&self, device: Arc<dyn SerioDevice>) -> Result<(), SystemError> { in register_port() argument
64 pub fn init_port(&self, device: Arc<dyn SerioDevice>) -> Result<(), SystemError> { in init_port() argument
Dserio_driver.rs16 fn write_wakeup(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in write_wakeup() argument
34 ) -> Result<(), SystemError>; in interrupt() argument
36 fn connect(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in connect() argument
38 fn reconnect(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in reconnect() argument
40 fn fast_reconnect(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in fast_reconnect() argument
42 fn disconnect(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in disconnect() argument
44 fn cleanup(&self, device: &Arc<dyn SerioDevice>) -> Result<(), SystemError>; in cleanup() argument
66 pub fn register(&self, driver: Arc<dyn SerioDriver>) -> Result<(), SystemError> { in register() argument
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/
Dvmx_asm_wrapper.rs7 pub fn vmxon(vmxon_pa: u64) -> Result<(), SystemError> { in vmxon() argument
26 pub fn vmx_vmwrite(vmcs_field: u32, value: u64) -> Result<(), SystemError> { in vmx_vmwrite() argument
38 pub fn vmx_vmread(vmcs_field: u32) -> Result<u64, SystemError> { in vmx_vmread() argument
48 pub fn vmx_vmptrld(vmcs_pa: u64) -> Result<(), SystemError> { in vmx_vmptrld() argument
91 pub fn vmx_vmclear(vmcs_pa: u64) -> Result<(), SystemError> { in vmx_vmclear() argument
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dmount.rs113 fn is_mountpoint_root(&self) -> Result<bool, SystemError> { in is_mountpoint_root() argument
135 fn open(&self, data: &mut FilePrivateData, mode: &FileMode) -> Result<(), SystemError> { in open() argument
139 fn close(&self, data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
149 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
160 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate() argument
170 ) -> Result<usize, SystemError> { in read_at() argument
180 ) -> Result<usize, SystemError> { in write_at() argument
195 fn metadata(&self) -> Result<super::Metadata, SystemError> { in metadata() argument
200 fn set_metadata(&self, metadata: &super::Metadata) -> Result<(), SystemError> { in set_metadata() argument
205 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize() argument
[all …]
Dmod.rs123 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
132 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
152 ) -> Result<usize, SystemError>; in read_at() argument
169 ) -> Result<usize, SystemError>; in write_at() argument
174 fn poll(&self, _private_data: &FilePrivateData) -> Result<usize, SystemError> { in poll() argument
183 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
192 fn set_metadata(&self, _metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
204 fn resize(&self, _len: usize) -> Result<(), SystemError> { in resize() argument
222 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create() argument
242 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
[all …]
Dfile.rs138 pub fn new(inode: Arc<dyn IndexNode>, mode: FileMode) -> Result<Self, SystemError> { in new() argument
171 pub fn read(&mut self, len: usize, buf: &mut [u8]) -> Result<usize, SystemError> { in read() argument
182 pub fn write(&mut self, len: usize, buf: &[u8]) -> Result<usize, SystemError> { in write() argument
200 ) -> Result<usize, SystemError> { in pread() argument
213 pub fn pwrite(&mut self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, SystemError> { in pwrite() argument
223 ) -> Result<usize, SystemError> { in do_read() argument
247 ) -> Result<usize, SystemError> { in do_write() argument
270 pub fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
276 pub fn get_entry_name(&self, ino: InodeId) -> Result<String, SystemError> { in get_entry_name() argument
283 pub fn lseek(&mut self, origin: SeekFrom) -> Result<usize, SystemError> { in lseek() argument
[all …]
/DragonOS-0.1.9/kernel/src/driver/tty/tty_ldisc/
Dmod.rs16 fn open(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in open() argument
17 fn close(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in close() argument
18 fn flush_buffer(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in flush_buffer() argument
36 ) -> Result<usize, SystemError>; in read() argument
43 ) -> Result<usize, SystemError>; in write() argument
44 fn ioctl(&self, tty: Arc<TtyCore>, cmd: u32, arg: usize) -> Result<usize, SystemError>; in ioctl() argument
49 fn set_termios(&self, tty: Arc<TtyCore>, old: Option<Termios>) -> Result<(), SystemError>; in set_termios() argument
51 fn poll(&self, tty: Arc<TtyCore>) -> Result<usize, SystemError>; in poll() argument
52 fn hangup(&self, tty: Arc<TtyCore>) -> Result<(), SystemError>; in hangup() argument
61 ) -> Result<usize, SystemError>; in receive_buf() argument
[all …]
/DragonOS-0.1.9/kernel/src/filesystem/sysfs/
Dfile.rs60 pub fn callback_read(&self, buf: &mut [u8], offset: usize) -> Result<usize, SystemError> { in callback_read() argument
83 pub fn callback_write(&self, buf: &[u8], offset: usize) -> Result<usize, SystemError> { in callback_write() argument
109 ) -> Result<(), SystemError> { in create_file() argument
120 ) -> Result<(), SystemError> { in add_file_with_mode() argument
208 ) -> Result<(), SystemError> { in create_bin_file() argument
238 ) -> Result<(), SystemError> { in add_bin_file_with_mode() argument
290 fn open(&self, _data: KernCallbackData) -> Result<(), SystemError> { in open() argument
299 ) -> Result<usize, SystemError> { in read() argument
308 ) -> Result<usize, SystemError> { in write() argument
313 fn poll(&self, _data: KernCallbackData) -> Result<PollStatus, SystemError> { in poll() argument
[all …]
/DragonOS-0.1.9/kernel/src/driver/base/platform/
Dplatform_driver.rs24 fn probe(&self, device: &Arc<dyn PlatformDevice>) -> Result<(), SystemError>; in probe() argument
25 fn remove(&self, device: &Arc<dyn PlatformDevice>) -> Result<(), SystemError>; in remove() argument
26 fn shutdown(&self, device: &Arc<dyn PlatformDevice>) -> Result<(), SystemError>; in shutdown() argument
27 fn suspend(&self, device: &Arc<dyn PlatformDevice>) -> Result<(), SystemError>; in suspend() argument
28 fn resume(&self, device: &Arc<dyn PlatformDevice>) -> Result<(), SystemError>; in resume() argument
43 pub fn register(&self, driver: Arc<dyn PlatformDriver>) -> Result<(), SystemError> { in register() argument
/DragonOS-0.1.9/kernel/src/driver/base/char/
Dmod.rs27 fn read(&self, len: usize, buf: &mut [u8]) -> Result<usize, SystemError>; in read() argument
34 fn write(&self, len: usize, buf: &[u8]) -> Result<usize, SystemError>; in write() argument
37 fn sync(&self) -> Result<(), SystemError>; in sync() argument
97 ) -> Result<DeviceNumber, SystemError> { in register_chardev_region() argument
111 ) -> Result<DeviceNumber, SystemError> { in alloc_chardev_region() argument
128 ) -> Result<DeviceNumber, SystemError> { in __register_chardev_region() argument
182 ) -> Result<(), SystemError> { in __unregister_chardev_region() argument
208 ) -> Result<(), SystemError> { in cdev_add() argument
/DragonOS-0.1.9/kernel/src/filesystem/ramfs/
Dmod.rs124 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate() argument
139 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
147 ) -> Result<(), SystemError> { in open() argument
157 ) -> Result<usize, SystemError> { in read_at() argument
189 ) -> Result<usize, SystemError> { in write_at() argument
222 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
230 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
242 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize() argument
258 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
305 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument
[all …]
/DragonOS-0.1.9/kernel/src/filesystem/kernfs/
Dmod.rs145 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
155 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
159 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
163 fn set_metadata(&self, _metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
168 fn resize(&self, _len: usize) -> Result<(), SystemError> { in resize() argument
178 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
183 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument
188 fn unlink(&self, _name: &str) -> Result<(), SystemError> { in unlink() argument
193 fn rmdir(&self, _name: &str) -> Result<(), SystemError> { in rmdir() argument
203 ) -> Result<(), SystemError> { in move_() argument
[all …]
Dcallback.rs15 fn open(&self, data: KernCallbackData) -> Result<(), SystemError>; in open() argument
22 ) -> Result<usize, SystemError>; in read() argument
29 ) -> Result<usize, SystemError>; in write() argument
31 fn poll(&self, data: KernCallbackData) -> Result<PollStatus, SystemError>; in poll() argument
68 pub fn callback_read(&self, buf: &mut [u8], offset: usize) -> Result<usize, SystemError> { in callback_read() argument
76 pub fn callback_write(&self, buf: &[u8], offset: usize) -> Result<usize, SystemError> { in callback_write() argument
93 pub fn callback_read(&self, buf: &mut [u8], offset: usize) -> Result<usize, SystemError> { in callback_read() argument
102 pub fn callback_write(&self, buf: &[u8], offset: usize) -> Result<usize, SystemError> { in callback_write() argument
/DragonOS-0.1.9/kernel/src/filesystem/devfs/
Dmod.rs107 ) -> Result<(), SystemError> { in register_device() argument
176 ) -> Result<(), SystemError> { in unregister_device() argument
271 pub fn add_dir(&self, name: &str) -> Result<(), SystemError> { in add_dir() argument
294 pub fn add_dev(&self, name: &str, dev: Arc<dyn IndexNode>) -> Result<(), SystemError> { in add_dev() argument
305 pub fn remove(&self, name: &str) -> Result<(), SystemError> { in remove() argument
324 ) -> Result<Arc<dyn IndexNode>, SystemError> { in do_create_with_data() argument
376 ) -> Result<(), SystemError> { in open() argument
380 fn close(&self, _data: &mut super::vfs::FilePrivateData) -> Result<(), SystemError> { in close() argument
390 ) -> Result<Arc<dyn IndexNode>, SystemError> { in create_with_data() argument
397 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() argument
[all …]
Dnull_dev.rs74 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
78 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
82 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
90 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
94 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
113 ) -> Result<usize, SystemError> { in read_at() argument
124 ) -> Result<usize, SystemError> { in write_at() argument
Dzero_dev.rs74 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
78 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
82 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
90 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
94 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
113 ) -> Result<usize, SystemError> { in read_at() argument
132 ) -> Result<usize, SystemError> { in write_at() argument
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/
Dmod.rs55 pub fn kvm_arch_dev_ioctl(cmd: u32, _arg: usize) -> Result<usize, SystemError> { in kvm_arch_dev_ioctl() argument
64 pub fn kvm_arch_vcpu_create(id: u32) -> Result<Arc<Mutex<VmxVcpu>>, SystemError> { in kvm_arch_vcpu_create() argument
70 pub fn kvm_arch_vcpu_setup(vcpu: &Mutex<VmxVcpu>) -> Result<(), SystemError> { in kvm_arch_vcpu_setup() argument
75 pub fn kvm_arch_vcpu_ioctl_run(_vcpu: &Mutex<VmxVcpu>) -> Result<(), SystemError> { in kvm_arch_vcpu_ioctl_run() argument
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dkmsg.rs59 pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read() argument
69 fn read_all(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_all() argument
80 fn read_level(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_level() argument
102 pub fn read_clear(&mut self, buf: &mut [u8]) -> Result<usize, SystemError> { in read_clear() argument
110 pub fn clear(&mut self) -> Result<usize, SystemError> { in clear() argument
118 pub fn set_level(&mut self, log_level: usize) -> Result<usize, SystemError> { in set_level() argument
155 pub fn data_size(&mut self) -> Result<usize, SystemError> { in data_size() argument
/DragonOS-0.1.9/kernel/src/virt/kvm/
Dvcpu_dev.rs99 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
104 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
108 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
116 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
120 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
144 ) -> Result<usize, SystemError> { in ioctl() argument
201 ) -> Result<usize, SystemError> { in read_at() argument
212 ) -> Result<usize, SystemError> { in write_at() argument
Dvm_dev.rs97 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
102 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
106 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
114 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
118 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
142 ) -> Result<usize, SystemError> { in ioctl() argument
194 ) -> Result<usize, SystemError> { in read_at() argument
205 ) -> Result<usize, SystemError> { in write_at() argument
210 fn kvm_vm_ioctl_create_vcpu(id: u32) -> Result<usize, SystemError> { in kvm_vm_ioctl_create_vcpu() argument
/DragonOS-0.1.9/kernel/src/driver/disk/ahci/
Dahci_inode.rs79 fn open(&self, _data: &mut FilePrivateData, _mode: &FileMode) -> Result<(), SystemError> { in open() argument
83 fn close(&self, _data: &mut FilePrivateData) -> Result<(), SystemError> { in close() argument
87 fn metadata(&self) -> Result<Metadata, SystemError> { in metadata() argument
95 fn list(&self) -> Result<Vec<String>, SystemError> { in list() argument
99 fn set_metadata(&self, metadata: &Metadata) -> Result<(), SystemError> { in set_metadata() argument
118 ) -> Result<usize, SystemError> { in read_at() argument
137 ) -> Result<usize, SystemError> { in write_at() argument
/DragonOS-0.1.9/kernel/src/driver/tty/
Dconsole.rs10 fn con_init(&self, vc_data: &mut VirtualConsoleData, init: bool) -> Result<(), SystemError>; in con_init() argument
13 fn con_deinit(&self) -> Result<(), SystemError>; in con_deinit() argument
30 ) -> Result<(), SystemError>; in con_clear() argument
44 ) -> Result<(), SystemError>; in con_putc() argument
60 ) -> Result<(), SystemError>; in con_putcs() argument
69 ) -> Result<(usize, usize, usize), SystemError> { in con_getxy() argument
97 ) -> Result<u8, SystemError> { in con_build_attr() argument
109 ) -> Result<(), SystemError>; in con_set_palette() argument

1234567