1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-02-27 00:59:41 +00:00

rust_lib_demo: Remove bin2hex.py

We are using scripts/bin2hex.py, so we can get rid of this copy.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
This commit is contained in:
Anton Blanchard
2020-04-16 17:44:17 +10:00
committed by Anton Blanchard
parent afbb99cfd4
commit 05f4f68c54

View File

@@ -1,17 +0,0 @@
#!/usr/bin/python3
import sys
import subprocess
import struct
with open(sys.argv[1], "rb") as f:
while True:
word = f.read(8)
if len(word) == 8:
print("%016x" % struct.unpack('Q', word));
elif len(word) == 4:
print("00000000%08x" % struct.unpack('I', word));
elif len(word) == 0:
exit(0);
else:
raise Exception("Bad length")