def ReadNode(self): Entry.ReadNode(self) self.return_invalid_entry = fdt_util.GetBool(self._node, 'return-invalid-entry') self.return_unknown_contents = fdt_util.GetBool( self._node, 'return-unknown-contents') self.bad_update_contents = fdt_util.GetBool(self._node, 'bad-update-contents') self.bad_shrink_contents = fdt_util.GetBool(self._node, 'bad-shrink-contents') self.return_contents_once = fdt_util.GetBool(self._node, 'return-contents-once') self.bad_update_contents_twice = fdt_util.GetBool( self._node, 'bad-update-contents-twice') # Set to True when the entry is ready to process the FDT. self.process_fdt_ready = False self.never_complete_process_fdt = fdt_util.GetBool( self._node, 'never-complete-process-fdt') self.require_args = fdt_util.GetBool(self._node, 'require-args') # This should be picked up by GetEntryArgsOrProps() self.test_existing_prop = 'existing' self.force_bad_datatype = fdt_util.GetBool(self._node, 'force-bad-datatype') (self.test_str_fdt, self.test_str_arg, self.test_int_fdt, self.test_int_arg, existing) = self.GetEntryArgsOrProps([ EntryArg('test-str-fdt', str), EntryArg('test-str-arg', str), EntryArg('test-int-fdt', int), EntryArg('test-int-arg', int), EntryArg('test-existing-prop', str) ], self.require_args) if self.force_bad_datatype: self.GetEntryArgsOrProps([EntryArg('test-bad-datatype-arg', bool)]) self.return_contents = True self.contents = b'aa'
def ReadNode(self): Entry.ReadNode(self) if self.size is None: self.Raise("'fill' entry must have a size property") self.fill_value = fdt_util.GetByte(self._node, 'fill-byte', 0)