+# SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
-# SPDX-License-Identifier: GPL-2.0+
-#
# Entry-type module for blobs, which are binary objects read from files
#
import tools
class Entry_blob(Entry):
- def __init__(self, image, etype, node):
- Entry.__init__(self, image, etype, node)
+ def __init__(self, section, etype, node):
+ Entry.__init__(self, section, etype, node)
self._filename = fdt_util.GetString(self._node, "filename", self.etype)
def ObtainContents(self):
# new Entry method which can read in chunks. Then we could copy
# the data in chunks and avoid reading it all at once. For now
# this seems like an unnecessary complication.
- self.data = fd.read()
- self.contents_size = len(self.data)
+ self.SetContents(fd.read())
return True
def GetDefaultFilename(self):