patman: Drop unicode helper functions

We don't need these now that everything uses Python 3. Remove them and
the extra code in GetBytes() and ToBytes() too.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-11-08 20:36:18 -07:00
parent 5ea9dccf02
commit fc0056e8d5
8 changed files with 17 additions and 63 deletions

View File

@@ -111,8 +111,7 @@ def EncodeFmap(image_size, name, areas):
ConvertName(names, params)
return struct.pack(fmt, *params)
values = FmapHeader(FMAP_SIGNATURE, 1, 0, 0, image_size,
tools.FromUnicode(name), len(areas))
values = FmapHeader(FMAP_SIGNATURE, 1, 0, 0, image_size, name, len(areas))
blob = _FormatBlob(FMAP_HEADER_FORMAT, FMAP_HEADER_NAMES, values)
for area in areas:
blob += _FormatBlob(FMAP_AREA_FORMAT, FMAP_AREA_NAMES, area)