Lines Matching refs:len
57 match FdtHeader::from_bytes_ref(fdt)?.totalsize() <= fdt.len() { in fdt_check_header()
75 name.len().try_into().map_err(|_| FdtError::IntegerOverflow)?, in fdt_add_subnode()
92 name.len().try_into().map_err(|_| FdtError::IntegerOverflow)?, in fdt_subnode_offset()
174 let mut len: core::ffi::c_int = 0; in get_property() localVariable
181 &mut len as *mut _, in get_property()
190 u32::from_be(v.len).try_into().map_err(|_| FdtError::IntegerOverflow)?, in get_property()
193 _ => Err(map_result(len).unwrap_err()), in get_property()
201 if name.len() == 0 { in find_node()
219 fdt.as_mut().len().try_into().map_err(|_| FdtError::IntegerOverflow)?, in new_from_init()
222 let new_size: u32 = fdt.as_mut().len().try_into().map_err(|_| FdtError::IntegerOverflow)?; in new_from_init()
253 val.len().try_into().map_err(|_| FdtError::IntegerOverflow)?, in set_property()
266 len: usize, in set_property_placeholder()
276 len.try_into().map_err(|_| FdtError::IntegerOverflow)?, in set_property_placeholder()
282 Ok(unsafe { from_raw_parts_mut(out_ptr, len) }) in set_property_placeholder()
289 if name.len() == 0 { in find_or_add_node()
313 let mut fdt_buf = vec![0u8; init.len()]; in test_new_from_invalid_fdt()
315 assert!(Fdt::new_from_init(&mut fdt_buf[..], &init[..init.len() - 1]).is_err()); in test_new_from_invalid_fdt()
324 let mut fdt_buf = vec![0u8; init.len()]; in test_get_property()
351 let mut fdt_buf = vec![0u8; init.len() + 512]; in test_set_property()
361 let mut fdt_buf = vec![0u8; init.len() + 512]; in test_set_property_placeholder()
365 fdt.set_property_placeholder("/new-node", &to_cstr("custom"), data.len()).unwrap(); in test_set_property_placeholder()
375 assert_eq!(header.totalsize(), init.len()); in test_header_from_raw()
390 let mut fdt_buf = vec![0u8; init.len() + 512]; in test_fdt_shrink_to_fit()
391 let fdt_buf_len = fdt_buf.len(); in test_fdt_shrink_to_fit()
395 assert_eq!(fdt.size().unwrap(), init.len()); in test_fdt_shrink_to_fit()