/DragonOS/kernel/src/libs/ |
H A D | printk.c | 25 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags); 27 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags… 60 char *str = NULL, *s = NULL, *end = NULL; in __do_vsprintf() local 62 str = buf; in __do_vsprintf() 80 *str = *fmt; in __do_vsprintf() 81 ++str; in __do_vsprintf() 185 *str++ = '%'; in __do_vsprintf() 195 *str = ' '; in __do_vsprintf() 196 ++str; in __do_vsprintf() 200 *str++ = (unsigned char)va_arg(args, int); in __do_vsprintf() [all …]
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | utils.rs | 16 pub fn split_path(path: &str) -> (&str, Option<&str>) { in split_path() argument 17 let mut path_split: core::str::SplitN<&str> = path.trim_matches('/').splitn(2, "/"); in split_path() 27 pub fn rsplit_path(path: &str) -> (&str, Option<&str>) { in rsplit_path() argument 28 let mut path_split: core::str::RSplitN<&str> = path.trim_matches('/').rsplitn(2, "/"); in rsplit_path() 43 path: &str, in user_path_at() argument 125 impl From<&str> for DName { 126 fn from(value: &str) -> Self { in from() 143 impl AsRef<str> for DName { 144 fn as_ref(&self) -> &str { in as_ref() argument
|
H A D | mod.rs | 232 name: &str, in create() argument 251 _name: &str, in create_with_data() argument 267 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument 278 fn unlink(&self, _name: &str) -> Result<(), SystemError> { in unlink() 289 fn rmdir(&self, _name: &str) -> Result<(), SystemError> { in rmdir() 299 _old_name: &str, in move_to() argument 301 _new_name: &str, in move_to() argument 313 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 494 _filename: &str, in mknod() argument 516 fn mkdir(&self, name: &str, mode: ModeType) -> Result<Arc<dyn IndexNode>, SystemError> { in mkdir() argument [all …]
|
H A D | mount.rs | 166 fn do_find(&self, name: &str) -> Result<Arc<MountFSInode>, SystemError> { in do_find() 242 name: &str, in create_with_data() argument 309 name: &str, in create() argument 321 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument 327 fn unlink(&self, name: &str) -> Result<(), SystemError> { in unlink() 339 fn rmdir(&self, name: &str) -> Result<(), SystemError> { in rmdir() 355 old_name: &str, in move_to() argument 357 new_name: &str, in move_to() argument 362 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 469 filename: &str, in mknod() argument [all …]
|
/DragonOS/kernel/src/driver/net/ |
H A D | sysfs.rs | 46 fn name(&self) -> Option<&str> { in name() argument 93 fn name(&self) -> &str { in name() argument 120 fn name(&self) -> &str { in name() argument 142 fn name(&self) -> &str { in name() argument 164 fn name(&self) -> &str { in name() argument 190 fn name(&self) -> &str { in name() argument 212 fn name(&self) -> &str { in name() argument 234 fn name(&self) -> &str { in name() argument 261 fn name(&self) -> &str { in name() argument 290 fn name(&self) -> &str { in name() argument [all …]
|
/DragonOS/user/apps/test_socket/src/ |
H A D | test_unix_stream.rs | 4 use std::{fs, str}; 6 const SOCKET_PATH: &str = "/test.socket"; 7 const MSG: &str = "Hello, unix stream socket!"; 31 let received_msg = str::from_utf8(&buffer[..nbytes]).unwrap(); in test_unix_stream()
|
H A D | test_unix_stream_pair.rs | 3 use std::str; 5 const MSG: &str = "Hello, unix stream socketpair!"; 14 let received_msg = str::from_utf8(&buffer[..nbytes]).unwrap(); in test_unix_stream_pair()
|
/DragonOS/user/apps/test_uart/ |
H A D | main.c | 25 char *str = "------fuck-----"; in main() local 26 int len = write(fd, str, strlen(str)); in main()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | trap.rs | 255 const ERR_MSG_1: &str = in do_invalid_TSS() 257 const ERR_MSG_2: &str = "Refers to a descriptor in the IDT.\n"; in do_invalid_TSS() 258 const ERR_MSG_3: &str = "Refers to a descriptor in the current LDT.\n"; in do_invalid_TSS() 259 const ERR_MSG_4: &str = "Refers to a descriptor in the GDT.\n"; in do_invalid_TSS() 261 let msg1: &str = if (error_code & 0x1) != 0 { in do_invalid_TSS() 267 let msg2: &str = if (error_code & 0x02) != 0 { in do_invalid_TSS() 319 …const ERR_MSG_1: &str = "The exception occurred during delivery of an event external to the progra… in do_general_protection() 320 const ERR_MSG_2: &str = "Refers to a gate descriptor in the IDT;\n"; in do_general_protection() 321 const ERR_MSG_3: &str = "Refers to a descriptor in the GDT or the current LDT;\n"; in do_general_protection() 322 const ERR_MSG_4: &str = "Refers to a segment or gate descriptor in the LDT;\n"; in do_general_protection() [all …]
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | mod.rs | 41 pub struct CompatibleTable(BTreeSet<&'static str>); 50 pub fn new(id_vec: Vec<&'static str>) -> CompatibleTable { in new() 65 pub fn add_device(&mut self, devices: Vec<&'static str>) { in add_device() argument 66 for str in devices { in add_device() 67 self.0.insert(str); in add_device()
|
/DragonOS/build-scripts/kernel_build/src/constant/ |
H A D | mod.rs | 1 pub const ARCH_DIR_X86_64: &str = "src/arch/x86_64"; 2 pub const ARCH_DIR_RISCV64: &str = "src/arch/riscv64";
|
/DragonOS/user/apps/user-manage/src/executor/ |
H A D | executor.rs | 39 fn open_file(file_path: &str) -> File { in open_file() 107 let mut field = line.split(":").collect::<Vec<&str>>(); in write_group_file() 108 let mut users = field.last().unwrap().split(",").collect::<Vec<&str>>(); in write_group_file() 112 .collect::<Vec<&str>>(); in write_group_file() 149 let mut field = line.split(":").collect::<Vec<&str>>(); in write_gshadow_file() 150 let mut users = field.last().unwrap().split(",").collect::<Vec<&str>>(); in write_gshadow_file() 154 .collect::<Vec<&str>>(); in write_gshadow_file() 200 let lines: Vec<&str> = content.lines().collect(); in update_passwd_file() 204 let field = line.split(':').collect::<Vec<&str>>(); in update_passwd_file() 207 .collect::<Vec<&str>>() in update_passwd_file() [all …]
|
/DragonOS/kernel/src/driver/video/fbdev/base/ |
H A D | fbsysfs.rs | 20 fn name(&self) -> Option<&str> { in name() argument 52 fn name(&self) -> &str { in name() argument 76 fn name(&self) -> &str { in name() argument 106 fn name(&self) -> &str { in name() argument 129 fn name(&self) -> &str { in name() argument 156 fn name(&self) -> &str { in name() argument 183 fn name(&self) -> &str { in name() argument 212 fn name(&self) -> &str { in name() argument 244 fn name(&self) -> &str { in name() argument 268 fn name(&self) -> &str { in name() argument [all …]
|
/DragonOS/kernel/crates/unified-init/src/ |
H A D | lib.rs | 11 name: &'static str, 16 name: &'static str, in new() argument 28 pub const fn name(&self) -> &'static str { in name() argument
|
/DragonOS/tools/ |
H A D | batch_delete_loop.py | 7 print("Deleting: " + str(i)) 8 os.system("sudo losetup -d /dev/loop" + str(i))
|
H A D | list_contributors.py | 9 parser.add_argument('--since', type=str, help='Since date') 10 parser.add_argument('--until', type=str, help='Until date') 11 parser.add_argument('--mode', type=str, help='脚本的运行模式 可选:<all> 输出所有信息\n' +
|
/DragonOS/tools/debugging/logmonitor/src/ |
H A D | app.rs | 13 pub title: &'a str, 27 pub stateful_logs: StatefulList<(&'a str, &'a str)>, 34 pub fn new(title: &'a str) -> Self { in new() 108 pub titles: Vec<&'a str>, 113 pub fn new(titles: Vec<&'a str>) -> TabsState { in new()
|
/DragonOS/kernel/src/debug/ |
H A D | kallsyms.c | 53 char str[512] = {0}; in read_symbol() local 54 char *s = fgets(str, sizeof(str), filp); in read_symbol() 55 if (s != str) in read_symbol() 61 int retval = sscanf(str, "%llx %c %512c", &entry->vaddr, &entry->type, symbol_name); in read_symbol()
|
/DragonOS/user/apps/test_lo/src/ |
H A D | main.rs | 2 use std::str; 14 let received_msg = str::from_utf8(&buf[..amt]).expect("Could not read buffer as UTF-8"); in main()
|
/DragonOS/kernel/src/driver/pci/ |
H A D | attr.rs | 21 fn name(&self) -> Option<&str> { in name() argument 46 fn name(&self) -> &str { in name() argument 77 fn name(&self) -> &str { in name() argument 108 fn name(&self) -> &str { in name() argument 139 fn name(&self) -> &str { in name() argument
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | fdt.rs | 59 fn prop_name(&self) -> &'static str { in prop_name() argument 64 impl From<FdtPropType> for &'static str { implementation 76 impl TryFrom<&str> for FdtPropType { 79 fn try_from(value: &str) -> Result<Self, Self::Error> { in try_from() 93 path: &'static str,
|
/DragonOS/kernel/src/exception/ |
H A D | sysfs.rs | 61 fn name(&self) -> Option<&str> { in name() argument 139 fn name(&self) -> &str { in name() argument 170 fn name(&self) -> &str { in name() argument 196 fn name(&self) -> &str { in name() argument 227 fn name(&self) -> &str { in name() argument 253 fn name(&self) -> &str { in name() argument 283 fn name(&self) -> &str { in name() argument
|
/DragonOS/kernel/crates/intertrait/tests/ |
H A D | on-trait-impl-assoc-type2.rs | 20 type I2 = &'static str; variable 33 let concat = source.cast::<dyn Concat<I1 = i32, I2 = &'static str>>(); in test_cast_to_on_trait_impl_with_assoc_type2() variable
|
H A D | on-trait-impl-assoc-type3.rs | 20 type I2 = &'static str; variable 33 let concat = source.cast::<dyn Concat<String, I1 = i32, I2 = &'static str>>(); in test_cast_to_on_trait_impl_with_assoc_type3() variable
|
/DragonOS/tools/debugging/logmonitor/src/backend/monitor/ |
H A D | logset.rs | 95 fn before_insert(&mut self, _log_set_name: &str, _log: &V) {} in before_insert() argument 97 fn after_insert(&mut self, _log_set_name: &str, _log: &V) {} in after_insert() argument 110 fn before_insert(&mut self, _log_set_name: &str, _log: &V) {} in before_insert() argument 112 fn after_insert(&mut self, _log_set_name: &str, _log: &V) {} in after_insert() argument
|