Lines Matching refs:cstr
20 use cstr::cstr;
85 assert_eq!(root.name(), Ok(cstr!(""))); in node_name()
88 assert_eq!(chosen.name(), Ok(cstr!("chosen"))); in node_name()
90 let nested_node_path = cstr!("/cpus/PowerPC,970@0"); in node_name()
92 assert_eq!(nested_node.name(), Ok(cstr!("PowerPC,970@0"))); in node_name()
100 let expected = [Ok(cstr!("cpus")), Ok(cstr!("randomnode")), Ok(cstr!("chosen"))]; in node_subnodes()
115 (Ok(cstr!("model")), Ok(b"MyBoardName\0".as_ref())), in node_properties()
116 (Ok(cstr!("compatible")), Ok(b"MyBoardName\0MyBoardFamilyName\0".as_ref())), in node_properties()
117 (Ok(cstr!("#address-cells")), Ok(&one_be)), in node_properties()
118 (Ok(cstr!("#size-cells")), Ok(&one_be)), in node_properties()
119 (Ok(cstr!("empty_prop")), Ok(&[])), in node_properties()
132 let node = fdt.node(cstr!("/cpus/PowerPC,970@1")).unwrap().unwrap(); in node_supernode_at_depth()
133 let expected = vec![Ok(cstr!("")), Ok(cstr!("cpus")), Ok(cstr!("PowerPC,970@1"))]; in node_supernode_at_depth()
190 assert_eq!(node.name(), Ok(cstr!("node_zz"))); in node_with_phandle()
195 assert_eq!(node.name(), Ok(cstr!("node_abc"))); in node_with_phandle()
206 assert_eq!(node.as_node().name(), Ok(cstr!("node_zz"))); in node_mut_with_phandle()
211 assert_eq!(node.as_node().name(), Ok(cstr!("node_abc"))); in node_mut_with_phandle()
220 let node = fdt.node(cstr!("/node_z/node_zz")).unwrap().unwrap(); in node_get_phandle()
224 let node = fdt.node(cstr!("/node_a/node_ab/node_abc")).unwrap().unwrap(); in node_get_phandle()
228 let node = fdt.node(cstr!("/node_b")).unwrap().unwrap(); in node_get_phandle()
237 let path = cstr!("/node_z/node_zz"); in node_nop()
262 let node_path = cstr!("/node_z/node_zz"); in node_add_subnode_with_namelen()
263 let subnode_name = cstr!("123456789"); in node_add_subnode_with_namelen()
292 let name = cstr!("node_a"); in node_subnode()
312 assert_eq!(Ok(cstr!("node_a")), node.name()); in node_subnode_with_name_bytes()
320 let name = cstr!("node_a"); in node_subnode_borrow_checker()
335 assert_eq!(symbols.name(), Ok(cstr!("__symbols__"))); in fdt_symbols()
346 let mut memory = fdt.node_mut(cstr!("/memory")).unwrap().unwrap(); in node_mut_as_node()
349 assert_eq!(memory.name(), Ok(cstr!("memory"))); in node_mut_as_node()
353 memory.setprop_inplace(cstr!("device_type"), b"MEMORY\0").unwrap(); in node_mut_as_node()
361 let node_z = fdt.node(cstr!("/node_z")).unwrap().unwrap(); in node_descendants()
368 (cstr!("node_za"), 1), in node_descendants()
369 (cstr!("node_zb"), 1), in node_descendants()
370 (cstr!("node_zz"), 1), in node_descendants()
371 (cstr!("node_zzz"), 2) in node_descendants()
385 if subnode.as_node().name() == Ok(cstr!("node_z")) { in node_mut_delete_and_next_subnode()
394 Ok(cstr!("node_a")), in node_mut_delete_and_next_subnode()
395 Ok(cstr!("node_b")), in node_mut_delete_and_next_subnode()
396 Ok(cstr!("node_c")), in node_mut_delete_and_next_subnode()
397 Ok(cstr!("__symbols__")), in node_mut_delete_and_next_subnode()
410 (Ok(cstr!("node_b")), 1), in node_mut_delete_and_next_node()
411 (Ok(cstr!("node_c")), 1), in node_mut_delete_and_next_node()
412 (Ok(cstr!("node_z")), 1), in node_mut_delete_and_next_node()
413 (Ok(cstr!("node_za")), 2), in node_mut_delete_and_next_node()
414 (Ok(cstr!("node_zb")), 2), in node_mut_delete_and_next_node()
415 (Ok(cstr!("__symbols__")), 1), in node_mut_delete_and_next_node()
422 if node_name == Ok(cstr!("node_a")) || node_name == Ok(cstr!("node_zz")) { in node_mut_delete_and_next_node()
467 assert_eq!(Ok(cstr!("")), name); in node_name_lifetime()
476 let names = [cstr!("a"), cstr!("b")]; in node_mut_add_subnodes()
495 root.subnode(cstr!("node_a")).unwrap() in node_subnode_lifetime()
502 assert_eq!(Ok(cstr!("node_a")), name); in node_subnode_lifetime()
524 assert_eq!(Ok(cstr!("node_a")), first_subnode_name); in node_subnodess_lifetime()
546 assert_eq!(Ok(cstr!("node_a")), first_descendant_name); in node_descendants_lifetime()