Home
last modified time | relevance | path

Searched refs:format (Results 1 – 25 of 76) sorted by relevance

1234

/DragonOS/kernel/crates/rbpf/src/
H A Dassembler.rs8 format,
101 entry(&format!("{name}32"), AluBinary, ebpf::BPF_ALU | opc); in make_instruction_map()
102 entry(&format!("{name}64"), AluBinary, ebpf::BPF_ALU64 | opc); in make_instruction_map()
108 &format!("ldabs{suffix}"), in make_instruction_map()
113 &format!("ldind{suffix}"), in make_instruction_map()
118 &format!("ldx{suffix}"), in make_instruction_map()
123 &format!("st{suffix}"), in make_instruction_map()
128 &format!("stx{suffix}"), in make_instruction_map()
138 &format!("{name}32"), in make_instruction_map()
146 entry(&format!("be{size}"), Endian(size), ebpf::BE); in make_instruction_map()
[all …]
H A Dverifier.rs21 use alloc::format;
26 let full_msg = format!("[Verifier] Error: {}", msg.as_ref()); in reject()
32 reject(format!( in check_prog_len()
38 reject(format!( in check_prog_len()
59 _ => reject(format!( in check_imm_endian()
70 reject(format!("incomplete LD_DW instruction (insn #{insn_ptr:?})"))?; in check_load_dw()
79 reject(format!("infinite loop (insn #{insn_ptr:?})"))?; in check_jmp_offset()
84 reject(format!( in check_jmp_offset()
91 reject(format!( in check_jmp_offset()
101 reject(format!("invalid source register (insn #{insn_ptr:?})"))?; in check_registers()
[all …]
H A Ddisassembler.rs8 format,
20 format!("{name} r{}, {:#x}", insn.dst, insn.imm) in alu_imm_str()
25 format!("{name} r{}, r{}", insn.dst, insn.src) in alu_reg_str()
34 format!("{name}{} r{}", insn.imm, insn.dst) in byteswap_str()
40 format!("{name} [r{}+{:#x}], {:#x}", insn.dst, insn.off, insn.imm) in ld_st_imm_str()
42 format!( in ld_st_imm_str()
54 format!("{name} r{}, [r{}+{:#x}]", insn.dst, insn.src, insn.off) in ld_reg_str()
56 format!( in ld_reg_str()
68 format!("{name} [r{}+{:#x}], r{}", insn.dst, insn.off, insn.src) in st_reg_str()
70 format!( in st_reg_str()
[all …]
/DragonOS/kernel/crates/rbpf/examples/
H A Dto_json.rs31 "opc" => format!("{:#x}", insn.opc), // => insn.opc, in to_json()
32 "dst" => format!("{:#x}", insn.dst), // => insn.dst, in to_json()
33 "src" => format!("{:#x}", insn.src), // => insn.src, in to_json()
34 "off" => format!("{:#x}", insn.off), // => insn.off, in to_json()
42 "imm" => format!("{:#x}", insn.imm as i32), // => insn.imm, in to_json()
/DragonOS/user/apps/user-manage/src/check/
H A Dcheck.rs52 format!("Unimplemented option: {}", op), in check()
72 let home_dir = format!("/home/{}", info.username.clone()); in check()
116 format!("The gid of the group [{}] isn't {}", info.group, info.gid), in check_group_gid()
128 format!("The gid of the group [{}] isn't {}", info.group, info.gid), in check_group_gid()
300 ErrorHandler::error_handle(format!("{} already exists", home), ExitStatus::InvalidArg); in check_home()
568 format!("group:[{}] doesn't exist", cmd.groupname), in check()
594 format!( in is_main_group()
658 format!("gid:[{}] is already used", new_gid), in check_group_file()
667 format!("groupname:[{}] is already used", new_groupname), in check_group_file()
682 format!("groupname:[{}] doesn't exist", info.groupname), in check_group_file()
[all …]
H A Dinfo.rs20 format!( in from()
69 format!("{}:{}:{}:\n", self.groupname, passwd, self.gid) in to_string_group()
78 format!("{}:{}::\n", self.groupname, passwd) in to_string_gshadow()
/DragonOS/build-scripts/kernel_build/src/kconfig/
H A Dmod.rs41 cfg_content.push_str(&format!("{} = y\n", f.name())); in make_compile_cfg()
43 cfg_content.push_str(&format!("{} = n\n", f.name())); in make_compile_cfg()
65 let d_config_str = format!("{}/d.config", path_str); in dfs()
68 fs::read_to_string(&d_config_path).expect(&format!("Failed to read {}", d_config_str)); in dfs()
108 fs::read_to_string(d_config).expect(&format!("Failed to read {}", path_str)); in parse_d_config()
110 toml::from_str(&dcfg_content).expect(&format!("Failed to parse {}", path_str)); in parse_d_config()
/DragonOS/user/apps/user-manage/src/executor/
H A Dexecutor.rs55 ErrorHandler::error_handle(format!("Can't open file: {}", file_path), exit_status); in open_file()
75 format!("unable to create {}", home), in execute()
119 new_content.push_str(format!("{}\n", field.join(":")).as_str()); in write_group_file()
130 let data = format!("{}::::::::\n", info.username,); in write_shadow_file()
161 new_content.push_str(format!("{}\n", field.join(":")).as_str()); in write_gshadow_file()
234 new_content.push_str(format!("{}\n", field.join(":").as_str()).as_str()); in update_group_file()
236 new_content.push_str(format!("{}\n", field.join(":").as_str()).as_str()); in update_group_file()
281 new_content.push_str(format!("{}\n", field.join(":").as_str()).as_str()); in update_gshadow_file()
283 new_content.push_str(format!("{}\n", field.join(":").as_str()).as_str()); in update_gshadow_file()
314 format!("unable to create {}", new_home), in execute()
[all …]
/DragonOS/kernel/src/driver/pci/
H A Dattr.rs66 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.vendor())); in show()
97 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.device_id())); in show()
128 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.subsystem_vendor())); in show()
159 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.subsystem_device())); in show()
190 return sysfs_emit_str(_buf, &format!("0x{:02x}", dev.revision())); in show()
221 return sysfs_emit_str(_buf, &format!("0x{:06x}", dev.class_code())); in show()
256 return sysfs_emit_str(_buf, &format!("{}", dev.irq_line())); in show()
289 &format!( in show()
/DragonOS/kernel/src/bpf/helper/
H A Dprint.rs6 use printf_compat::{format, output};
10 let bytes_written = format(str as _, args.as_va_list(), output::fmt_write(w)); in printf()
/DragonOS/kernel/src/filesystem/procfs/
H A Dmod.rs7 format,
162 &mut format!("Name:\t{}", pcb.basic().name()) in open_status()
178 pdata.append(&mut format!("\nState:\t{:?}", state).as_bytes().to_owned()); in open_status()
181 pdata.append(&mut format!("\nTgid:\t{}", pcb.tgid().into()).into()); in open_status()
185 &mut format!("\nPid:\t{}", pcb.pid().into()) in open_status()
192 &mut format!("\nPpid:\t{}", pcb.basic().ppid().into()) in open_status()
198 pdata.append(&mut format!("\nFDSize:\t{}", pcb.fd_table().read().fd_open_count()).into()); in open_status()
201 pdata.append(&mut format!("\nKthread:\t{}", pcb.is_kthread() as usize).into()); in open_status()
203 pdata.append(&mut format!("\ncpu_id:\t{}", cpu_id).as_bytes().to_owned()); in open_status()
204 pdata.append(&mut format!("\npriority:\t{:?}", priority).as_bytes().to_owned()); in open_status()
[all …]
/DragonOS/kernel/src/exception/
H A Dsysfs.rs160 let name = format!("{}\n", name); in show()
188 return sysfs_emit_str(buf, &format!("{}\n", hwirq.data())); in show()
219 return sysfs_emit_str(buf, &format!("{}\n", irq_type)); in show()
245 return sysfs_emit_str(buf, &format!("{}\n", wakeup)); in show()
272 return sysfs_emit_str(buf, &format!("{}\n", name)); in show()
306 len += sysfs_emit_str(&mut buf[len..], &format!(",{}", action.inner().name())) in show()
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Dfbsysfs.rs68 return sysfs_emit_str(buf, &format!("{}\n", name)); in show()
97 return sysfs_emit_str(buf, &format!("{}\n", bits_per_pixel)); in show()
199 return sysfs_emit_str(buf, &format!("{},{}\n", var_info.xoffset, var_info.yoffset)); in show()
230 &format!("{},{}\n", var_info.xres_virtual, var_info.yres_virtual), in show()
260 return sysfs_emit_str(buf, &format!("{}\n", fix_info.line_length)); in show()
285 return sysfs_emit_str(buf, &format!("{}\n", var_info.rotate_angle)); in show()
314 return sysfs_emit_str(buf, &format!("{}\n", fb.state() as u8)); in show()
/DragonOS/tools/
H A Dlist_contributors.py19 format = '--pretty={"commit":"%h", "author":"%an", "email":"%ae", "date":"%cd"}' variable
21 logs = repo.git.log(format, since=args.since, until=args.until)
H A DMakefile9 @cargo +nightly-2024-11-05 check --workspace --message-format=json
/DragonOS/user/apps/user-manage/src/parser/
H A Dparser.rs33 format!("Invalid arg {} of option: {}", args[idx + 1], op), in parse()
54 format!("Invalid arg of option: {}", op), in parse()
118 format!("Invalid arg of option: {}", op), in parse()
/DragonOS/kernel/
H A DMakefile39 …)" cargo +nightly-2024-11-05 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./sr…
41 …)" cargo +nightly-2024-11-05 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./sr…
/DragonOS/kernel/crates/intertrait/macros/src/
H A Dargs.rs17 let msg = format!("Unknown flag: {}", unknown); in from()
43 let msg = format!("Duplicated flag: {}", ident); in parse()
/DragonOS/build-scripts/
H A DMakefile8 @cargo +nightly-2024-11-05 check --workspace $(CARGO_ZBUILD) --message-format=json
/DragonOS/kernel/crates/klog_types/src/
H A Dlib.rs8 use alloc::format;
209 .field("magic", &format!("{:#x}", self.magic)) in fmt()
215 &format!( in fmt()
/DragonOS/kernel/src/arch/riscv64/init/
H A Ddragonstub.rs18 Ok(format!("DragonStub").into()) in init_bootloader_name()
/DragonOS/kernel/crates/intertrait/tests/
H A Don-trait-impl-assoc-type2.rs23 format!("Data: {} - {}", a, b) in concat()
H A Don-trait-impl-assoc-type3.rs23 format!("{}: {} - {}", prefix, a, b) in concat()
/DragonOS/kernel/src/driver/rtc/
H A Dmod.rs83 format!( in date_string()
95 format!("{:02}:{:02}:{:02}", self.hour, self.minute, self.second) in time_string()
/DragonOS/user/apps/user-manage/src/cmd/
H A Duseradd.rs32 format!("usage: {} [options] username", args[0]), in main()

1234