patman: Convert camel case in tout.py
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -185,7 +185,7 @@ def LookupAndWriteSymbols(elf_fname, entry, section):
|
||||
value = -1
|
||||
pack_string = pack_string.lower()
|
||||
value_bytes = struct.pack(pack_string, value)
|
||||
tout.Debug('%s:\n insert %s, offset %x, value %x, length %d' %
|
||||
tout.debug('%s:\n insert %s, offset %x, value %x, length %d' %
|
||||
(msg, name, offset, value, len(value_bytes)))
|
||||
entry.data = (entry.data[:offset] + value_bytes +
|
||||
entry.data[offset + sym.size:])
|
||||
@@ -350,7 +350,7 @@ def DecodeElf(data, location):
|
||||
mem_end - data_start)
|
||||
|
||||
def UpdateFile(infile, outfile, start_sym, end_sym, insert):
|
||||
tout.Notice("Creating file '%s' with data length %#x (%d) between symbols '%s' and '%s'" %
|
||||
tout.notice("Creating file '%s' with data length %#x (%d) between symbols '%s' and '%s'" %
|
||||
(outfile, len(insert), len(insert), start_sym, end_sym))
|
||||
syms = GetSymbolFileOffset(infile, [start_sym, end_sym])
|
||||
if len(syms) != 2:
|
||||
@@ -368,4 +368,4 @@ def UpdateFile(infile, outfile, start_sym, end_sym, insert):
|
||||
newdata += insert + tools.get_bytes(0, size - len(insert))
|
||||
newdata += data[syms[end_sym].offset:]
|
||||
tools.write_file(outfile, newdata)
|
||||
tout.Info('Written to offset %#x' % syms[start_sym].offset)
|
||||
tout.info('Written to offset %#x' % syms[start_sym].offset)
|
||||
|
Reference in New Issue
Block a user