Lines Matching refs:c_int

17 use core::ffi::{c_int, c_uint};
98 pub(crate) struct FdtRawResult(c_int);
100 impl From<c_int> for FdtRawResult {
101 fn from(value: c_int) -> Self { in from()
106 impl TryFrom<FdtRawResult> for c_int { implementation
119 x if x == -(FDT_ERR_NOTFOUND as c_int) => Err(FdtError::NotFound), in try_from()
120 x if x == -(FDT_ERR_EXISTS as c_int) => Err(FdtError::Exists), in try_from()
121 x if x == -(FDT_ERR_NOSPACE as c_int) => Err(FdtError::NoSpace), in try_from()
122 x if x == -(FDT_ERR_BADOFFSET as c_int) => Err(FdtError::BadOffset), in try_from()
123 x if x == -(FDT_ERR_BADPATH as c_int) => Err(FdtError::BadPath), in try_from()
124 x if x == -(FDT_ERR_BADPHANDLE as c_int) => Err(FdtError::BadPhandle), in try_from()
125 x if x == -(FDT_ERR_BADSTATE as c_int) => Err(FdtError::BadState), in try_from()
126 x if x == -(FDT_ERR_TRUNCATED as c_int) => Err(FdtError::Truncated), in try_from()
127 x if x == -(FDT_ERR_BADMAGIC as c_int) => Err(FdtError::BadMagic), in try_from()
128 x if x == -(FDT_ERR_BADVERSION as c_int) => Err(FdtError::BadVersion), in try_from()
129 x if x == -(FDT_ERR_BADSTRUCTURE as c_int) => Err(FdtError::BadStructure), in try_from()
130 x if x == -(FDT_ERR_BADLAYOUT as c_int) => Err(FdtError::BadLayout), in try_from()
131 x if x == -(FDT_ERR_INTERNAL as c_int) => Err(FdtError::Internal), in try_from()
132 x if x == -(FDT_ERR_BADNCELLS as c_int) => Err(FdtError::BadNCells), in try_from()
133 x if x == -(FDT_ERR_BADVALUE as c_int) => Err(FdtError::BadValue), in try_from()
134 x if x == -(FDT_ERR_BADOVERLAY as c_int) => Err(FdtError::BadOverlay), in try_from()
135 x if x == -(FDT_ERR_NOPHANDLES as c_int) => Err(FdtError::NoPhandles), in try_from()
136 x if x == -(FDT_ERR_BADFLAGS as c_int) => Err(FdtError::BadFlags), in try_from()
137 x if x == -(FDT_ERR_ALIGNMENT as c_int) => Err(FdtError::Alignment), in try_from()
143 impl TryFrom<FdtRawResult> for Option<c_int> {
159 Ok(c_int::try_from(res)?.try_into().unwrap()) in try_from()
167 Ok(c_int::try_from(res)?.try_into().unwrap()) in try_from()