fwcutter/make: Avoid _DEFAULT_SOURCE warning
[b43-tools.git] / disassembler / brcm80211-ivaldump
index 9a1ad2d7be5d03634ddf67df99b1a7807e4232a2..4225da61b7a39369365028229b61c1dfac465034 100755 (executable)
@@ -2,7 +2,7 @@
 """
 #   A small script to dump the contents of a brcm80211 initvals section
 #
-#   Copyright (C) 2010  Michael Buesch <mb@bu3sch.de>
+#   Copyright (C) 2010  Michael Buesch <m@bues.ch>
 #
 #   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 <mb@bu3sch.de>"
+       print "Copyright (C) 2010 Michael Buesch <m@bues.ch>"
        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)