Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 132) sorted by relevance

123456

/DragonOS/kernel/src/libs/
H A Dprintk.c25 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 Dutils.rs16 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 Dmod.rs235 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 Dmount.rs167 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 Dcmdline.rs2 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 Dsysfs.rs46 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 Dtest_unix_stream.rs4 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 Dtest_unix_stream_pair.rs3 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 Dmain.c25 char *str = "------fuck-----"; in main() local
26 int len = write(fd, str, strlen(str)); in main()
/DragonOS/kernel/src/debug/traceback/
H A Dtraceback.c8 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 Dtrap.rs256 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 Dmod.rs41 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 Dprint.rs9 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 Dmod.rs1 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 Dexecutor.rs39 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 Dfbsysfs.rs20 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 Dlib.rs11 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 Dbatch_delete_loop.py7 print("Deleting: " + str(i))
8 os.system("sudo losetup -d /dev/loop" + str(i))
H A Dlist_contributors.py9 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 Dapp.rs13 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 Dkallsyms.c53 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 Dattr.rs21 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 Dmain.rs2 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 Dcommon.rs6 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 Dfdt.rs59 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,

123456