diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-29 14:14:04 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-09 12:26:12 -0700 |
commit | c1aa66e75dbfcacab1fbca0e3e19c09e08d932d5 (patch) | |
tree | c33854b5848f407f5ad6b2d2337665ccd436eab4 /tools/binman/etype/section.py | |
parent | 82ee8bfe519307b4175bb0f751da73c8555a0a25 (diff) |
patman: Convert camel case in tools.py
Convert this file to snake case and update all files which use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype/section.py')
-rw-r--r-- | tools/binman/etype/section.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index bb375e9063..b3d7302394 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -19,7 +19,7 @@ from binman import state from dtoc import fdt_util from patman import tools from patman import tout -from patman.tools import ToHexSize +from patman.tools import to_hex_size class Entry_section(Entry): @@ -269,19 +269,19 @@ class Entry_section(Entry): data = bytearray() # Handle padding before the entry if entry.pad_before: - data += tools.GetBytes(self._pad_byte, entry.pad_before) + data += tools.get_bytes(self._pad_byte, entry.pad_before) # Add in the actual entry data data += entry_data # Handle padding after the entry if entry.pad_after: - data += tools.GetBytes(self._pad_byte, entry.pad_after) + data += tools.get_bytes(self._pad_byte, entry.pad_after) if entry.size: - data += tools.GetBytes(pad_byte, entry.size - len(data)) + data += tools.get_bytes(pad_byte, entry.size - len(data)) - self.Detail('GetPaddedDataForEntry: size %s' % ToHexSize(self.data)) + self.Detail('GetPaddedDataForEntry: size %s' % to_hex_size(self.data)) return data @@ -316,7 +316,7 @@ class Entry_section(Entry): # Handle empty space before the entry pad = (entry.offset or 0) - self._skip_at_start - len(section_data) if pad > 0: - section_data += tools.GetBytes(self._pad_byte, pad) + section_data += tools.get_bytes(self._pad_byte, pad) # Add in the actual entry data section_data += data @@ -709,14 +709,14 @@ class Entry_section(Entry): if not size: data = self.GetPaddedData(self.data) size = len(data) - size = tools.Align(size, self.align_size) + size = tools.align(size, self.align_size) if self.size and contents_size > self.size: self._Raise("contents size %#x (%d) exceeds section size %#x (%d)" % (contents_size, contents_size, self.size, self.size)) if not self.size: self.size = size - if self.size != tools.Align(self.size, self.align_size): + if self.size != tools.align(self.size, self.align_size): self._Raise("Size %#x (%d) does not match align-size %#x (%d)" % (self.size, self.size, self.align_size, self.align_size)) |