X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fbinman%2Fetype%2Fblob.py;h=28e6651a935e4c171b2e26c7ada812128919b031;hb=bb74837c9a32e51187d843c2469f0176d674c5f9;hp=def21640b56f8c0ae4ed1c2c04a07dd553833264;hpb=a5b24110cad65c73d6bcf6ecada07d926975ed54;p=oweals%2Fu-boot.git diff --git a/tools/binman/etype/blob.py b/tools/binman/etype/blob.py index def21640b5..28e6651a93 100644 --- a/tools/binman/etype/blob.py +++ b/tools/binman/etype/blob.py @@ -1,8 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass # -# SPDX-License-Identifier: GPL-2.0+ -# # Entry-type module for blobs, which are binary objects read from files # @@ -11,8 +10,8 @@ import fdt_util 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): @@ -29,8 +28,7 @@ class Entry_blob(Entry): # 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):