/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 | 235 name: &str, in create() argument 254 _name: &str, in create_with_data() argument 270 fn link(&self, _name: &str, _other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument 281 fn unlink(&self, _name: &str) -> Result<(), SystemError> { in unlink() 292 fn rmdir(&self, _name: &str) -> Result<(), SystemError> { in rmdir() 302 _old_name: &str, in move_to() argument 304 _new_name: &str, in move_to() argument 316 fn find(&self, _name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 497 _filename: &str, in mknod() argument 519 fn mkdir(&self, name: &str, mode: ModeType) -> Result<Arc<dyn IndexNode>, SystemError> { in mkdir() argument [all …]
|
H A D | mount.rs | 167 fn do_find(&self, name: &str) -> Result<Arc<MountFSInode>, SystemError> { in do_find() 260 name: &str, in create_with_data() argument 327 name: &str, in create() argument 339 fn link(&self, name: &str, other: &Arc<dyn IndexNode>) -> Result<(), SystemError> { in link() argument 345 fn unlink(&self, name: &str) -> Result<(), SystemError> { in unlink() 357 fn rmdir(&self, name: &str) -> Result<(), SystemError> { in rmdir() 373 old_name: &str, in move_to() argument 375 new_name: &str, in move_to() argument 380 fn find(&self, name: &str) -> Result<Arc<dyn IndexNode>, SystemError> { in find() 496 filename: &str, in mknod() argument [all …]
|
/DragonOS/kernel/src/init/ |
H A D | cmdline.rs | 2 str, 39 name: &'static str, 41 default_str: &'static str, 48 pub const fn new(name: &'static str, ty: KCmdlineParamType) -> Self { in new() argument 58 pub const fn default_str(mut self, default_str: &'static str) -> Self { in default_str() 116 pub fn name(&self) -> &str { in name() argument 133 pub fn value_str(&self) -> Option<&str> { in value_str() argument 139 .and_then(|v| str::from_utf8(v.as_bytes()).ok()), in value_str() 170 name: &'static str, 185 name: &'static str, [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/debug/traceback/ |
H A D | traceback.c | 8 const char *str = (const char *)&kallsyms_names; in lookup_kallsyms() local 23 …printk("function:%s() \t(+) %04d address:%#018lx\n", &str[kallsyms_names_index[index]], addr - kal… in lookup_kallsyms() 32 const char *str = (const char *)&kallsyms_names; in addr_from_symbol() local 35 if (strcmp(&str[kallsyms_names_index[i]], symbol) == 0) in addr_from_symbol()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | trap.rs | 256 const ERR_MSG_1: &str = in do_invalid_TSS() 258 const ERR_MSG_2: &str = "Refers to a descriptor in the IDT.\n"; in do_invalid_TSS() 259 const ERR_MSG_3: &str = "Refers to a descriptor in the current LDT.\n"; in do_invalid_TSS() 260 const ERR_MSG_4: &str = "Refers to a descriptor in the GDT.\n"; in do_invalid_TSS() 262 let msg1: &str = if (error_code & 0x1) != 0 { in do_invalid_TSS() 268 let msg2: &str = if (error_code & 0x02) != 0 { in do_invalid_TSS() 320 …const ERR_MSG_1: &str = "The exception occurred during delivery of an event external to the progra… in do_general_protection() 321 const ERR_MSG_2: &str = "Refers to a gate descriptor in the IDT;\n"; in do_general_protection() 322 const ERR_MSG_3: &str = "Refers to a descriptor in the GDT or the current LDT;\n"; in do_general_protection() 323 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/kernel/src/bpf/helper/ |
H A D | print.rs | 9 pub unsafe extern "C" fn printf(w: &mut impl Write, str: *const c_char, mut args: ...) -> c_int { in printf() 10 let bytes_written = format(str as _, args.as_va_list(), output::fmt_write(w)); in printf() 16 fn write_str(&mut self, s: &str) -> core::fmt::Result { in write_str()
|
/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<'a> { 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/kernel/src/driver/pci/ |
H A D | attr.rs | 21 fn name(&self) -> Option<&str> { in name() argument 55 fn name(&self) -> &str { in name() argument 86 fn name(&self) -> &str { in name() argument 117 fn name(&self) -> &str { in name() argument 148 fn name(&self) -> &str { in name() argument 179 fn name(&self) -> &str { in name() argument 210 fn name(&self) -> &str { in name() argument 241 fn name(&self) -> &str { in name() argument 276 fn name(&self) -> &str { in name() argument
|
/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/build-scripts/kernel_build/src/cfiles/ |
H A D | common.rs | 6 const DIRS: [&str; 3] = ["src/common", "src/debug/traceback", "src/libs"]; in setup_common_files() 17 const DIRS: [&str; 3] = ["src/include", "src/common", "src"]; in setup_common_include_dir()
|
/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,
|