Home
last modified time | relevance | path

Searched refs:try_from (Results 1 – 20 of 20) sorted by relevance

/DragonOS/kernel/src/arch/x86_64/init/
H A Dboot.rs26 fn try_from(value: u64) -> Result<Self, Self::Error> { in try_from() method
44 let boot_protocol = BootProtocol::try_from(boot_entry_type)?; in early_boot_init()
/DragonOS/kernel/src/process/
H A Dresource.rs66 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
135 fn try_from(value: usize) -> Result<Self, Self::Error> { in try_from() method
H A Dabi.rs57 fn try_from(value: u32) -> Result<Self, Self::Error> { in try_from() method
H A Dsyscall.rs474 let who = RUsageWho::try_from(who)?; in get_rusage()
507 let resource = RLimitID::try_from(resource)?; in prlimit64()
/DragonOS/kernel/src/net/
H A Dsyscall.rs41 let address_family = AddressFamily::try_from(address_family as u16)?; in socket()
42 let socket_type = PosixSocketType::try_from((socket_type & 0xf) as u8)?; in socket()
70 let address_family = AddressFamily::try_from(address_family as u16)?; in socketpair()
71 let socket_type = PosixSocketType::try_from((socket_type & 0xf) as u8)?; in socketpair()
143 let optname = PosixSocketOption::try_from(optname as i32) in getsockopt()
176 PosixIpProtocol::try_from(level as u16).map_err(|_| SystemError::ENOPROTOOPT)?; in getsockopt()
178 let optname = PosixTcpSocketOptions::try_from(optname as i32) in getsockopt()
571 match AddressFamily::try_from(addr.family)? { in to_endpoint()
625 let ret = match AddressFamily::try_from(unsafe { self.family })? { in len()
812 fn try_from(value: u16) -> Result<Self, Self::Error> { in try_from() method
[all …]
/DragonOS/kernel/src/driver/firmware/efi/
H A Dfdt.rs79 fn try_from(value: &str) -> Result<Self, Self::Error> { in try_from() method
140 let prop_type = FdtPropType::try_from(prop.name); in get_fdt_params()
/DragonOS/kernel/src/time/
H A Dsyscall.rs60 fn try_from(value: i32) -> Result<Self, Self::Error> { in try_from() method
138 let clock_id = PosixClockID::try_from(clock_id)?; in clock_gettime()
/DragonOS/kernel/src/arch/x86_64/driver/apic/
H A Dmod.rs145 .set_delivery_mode(DeliveryMode::try_from(((data >> 8) & 0b111) as u8).ok()?) in new()
163 .set_timer_mode(LocalApicTimerMode::try_from(((data >> 17) & 0b11) as u8).ok()?) in new()
218 return DeliveryMode::try_from(((self.data >> 8) & 0b111) as u8).ok(); in delivery_mode()
390 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() method
H A Dapic_timer.rs289 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() method
/DragonOS/user/apps/test_ebpf/src/
H A Dmain.rs36 HashMap::try_from(bpf.map("SYSCALL_LIST").unwrap()).unwrap(); in main()
/DragonOS/kernel/src/debug/kprobe/
H A Dargs.rs24 fn try_from(kprobe_info: KprobeInfo) -> Result<Self, Self::Error> { in try_from() method
H A Dmod.rs151 let kprobe_builder = KprobeBuilder::try_from(kprobe_info)?; in register_kprobe()
/DragonOS/kernel/src/bpf/map/
H A Dutil.rs19 fn try_from(value: &bpf_attr) -> Result<Self, Self::Error> { in try_from() method
H A Dmod.rs193 let map_meta = BpfMapMeta::try_from(attr)?; in bpf_map_create()
/DragonOS/kernel/src/perf/
H A Dutil.rs49 pub fn try_from( in try_from() method
H A Dmod.rs269 let args = PerfProbeArgs::try_from(attr, pid, cpu, group_fd, flags)?; in perf_event_open()
/DragonOS/kernel/src/bpf/prog/
H A Dutil.rs84 fn try_from(attr: &bpf_attr) -> Result<Self, Self::Error> { in try_from() method
H A Dmod.rs114 let args = BpfProgMeta::try_from(attr)?; in bpf_prog_load()
/DragonOS/kernel/src/net/socket/
H A Dmod.rs750 fn try_from(x: u16) -> Result<Self, Self::Error> { in try_from() method
770 fn try_from(x: u8) -> Result<Self, Self::Error> { in try_from() method
/DragonOS/kernel/src/driver/pci/
H A Dpci.rs1164 fn try_from(value: u8) -> Result<Self, Self::Error> { in try_from() method
1347 let address_type = MemoryBarType::try_from(((bar_orig & 0x00000006) >> 1) as u8)?; in pci_bar_init()