Lines Matching refs:libfdt

13 import libfdt
14 from libfdt import Fdt, FdtSw, FdtException, QUIET_NOTFOUND, QUIET_ALL
56 return 'pylibfdt error %d: %s' % (-err_code, libfdt.strerror(-err_code))
68 return libfdt.Fdt(f.read())
121 self.assertEqual(type(libfdt), types.ModuleType)
126 fdt = libfdt.Fdt(b'a string')
127 self.assertEqual(e.exception.err, -libfdt.BADMAGIC)
136 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
147 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
149 -libfdt.NOTFOUND)
160 -libfdt.NOTFOUND)
166 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
172 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
175 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
180 -libfdt.NOTFOUND)
183 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
193 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
205 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
207 -libfdt.BADOFFSET,
208 self.fdt.get_property_by_offset(-2, [libfdt.BADOFFSET]))
215 self.assertEqual(-libfdt.NOTFOUND, self.fdt.getprop(root, 'missing',
220 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
228 self.assertEqual(libfdt.strerror(-libfdt.NOTFOUND),
238 node, depth = self.fdt.next_node(node, depth, (libfdt.BADOFFSET,))
262 -libfdt.NOTFOUND)
265 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
269 -libfdt.NOTFOUND)
272 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
311 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
314 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
317 self.assertEqual(e.exception.err, -libfdt.BADOFFSET)
321 with self.assertRaisesRegex(FdtException, get_err(libfdt.BADPATH)):
326 self.assertEqual(-libfdt.NOTFOUND,
328 self.assertEqual(-libfdt.BADOFFSET,
330 self.assertEqual(-libfdt.BADPATH,
335 self.assertEqual(0, libfdt.fdt_get_phandle(self.fdt._fdt, 0))
337 self.assertEqual(0x2000, libfdt.fdt_get_phandle(self.fdt._fdt, node2))
353 self.assertEqual(-libfdt.NOTFOUND,
357 self.assertEqual(e.exception.err, -libfdt.NOTFOUND)
366 self.assertEqual(-libfdt.NOTFOUND,
394 self.assertEqual(-libfdt.NOSPACE,
395 Fdt.create_empty_tree(1, (libfdt.NOSPACE,)))
416 self.assertEqual(-libfdt.NOTFOUND,
418 self.assertEqual(-libfdt.NOSPACE,
420 quiet=(libfdt.NOSPACE,)))
503 with self.assertRaisesRegex(FdtException, get_err(libfdt.NOSPACE)):
504 self.assertEqual(-libfdt.NOSPACE, FdtSw(3))
579 self.fdt = libfdt.FdtRo(f.read())