diff --git a/llvm/test/CodeGen/BPF/BTF/print_btf.py b/llvm/test/CodeGen/BPF/BTF/print_btf.py index 6ce08b76c363e..c574d0f8524b0 100644 --- a/llvm/test/CodeGen/BPF/BTF/print_btf.py +++ b/llvm/test/CodeGen/BPF/BTF/print_btf.py @@ -88,7 +88,7 @@ def print_btf(filename): buf = file.read() fmt_cache = {} - endian_pfx = "" + endian_pfx = ">" # big endian off = 0 def unpack(fmt): @@ -104,9 +104,9 @@ def unpack(fmt): # Use magic number at the header start to determine endianness (magic,) = unpack("H") if magic == 0xEB9F: - endian_pfx = "<" + endian_pfx = ">" # big endian elif magic == 0x9FEB: - endian_pfx = ">" + endian_pfx = "<" # little endian else: warn(f"Unexpected BTF magic: {magic:02x}") return @@ -290,6 +290,6 @@ def warn_nonzero(val, name): if __name__ == "__main__": if len(sys.argv) != 2: - warn("Usage: {sys.argv[0]} ") + warn(f"Usage: {sys.argv[0]} ") sys.exit(1) print_btf(sys.argv[1])