X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=disassembler%2Fbrcm80211-ivaldump;h=4225da61b7a39369365028229b61c1dfac465034;hb=HEAD;hp=9a1ad2d7be5d03634ddf67df99b1a7807e4232a2;hpb=32c0354095b2d2ca8fa58ede4fd9b47d793cb249;p=b43-tools.git diff --git a/disassembler/brcm80211-ivaldump b/disassembler/brcm80211-ivaldump index 9a1ad2d..4225da6 100755 --- a/disassembler/brcm80211-ivaldump +++ b/disassembler/brcm80211-ivaldump @@ -2,7 +2,7 @@ """ # A small script to dump the contents of a brcm80211 initvals section # -# Copyright (C) 2010 Michael Buesch +# Copyright (C) 2010 Michael Buesch # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 @@ -21,7 +21,7 @@ def usage(): print "brcm80211 initvals section dumper" print "Prints a .initvals assembly section to stdout." print "" - print "Copyright (C) 2010 Michael Buesch " + print "Copyright (C) 2010 Michael Buesch " print "Licensed under the GNU/GPL version 2" print "" print "Usage: brcm80211-ivaldump FILE" @@ -64,7 +64,10 @@ for idx in range(0, len(ivals), 8): if size == 4: print "\tmmio32\t0x%08X, 0x%04X" % (value, addr) elif size == 2: - print "\tmmio16\t0x%08X, 0x%04X" % (value, addr) + if value & 0xFFFF0000: + print "The input file is malformed (invalid value for 16bit field)" + sys.exit(1) + print "\tmmio16\t0x%04X, 0x%04X" % (value, addr) else: print "The input file is malformed (invalid size field: 0x%04X)" % size sys.exit(1)