X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=bitfield;h=27605d33bf3a7cdcb52e3f3f686f8b0c71b43a89;hb=f28ac723f98f1618f4cbf203cf226f1e9c37cdc4;hp=c70c6c6af86f2682906936f7d5338245031eb87d;hpb=a0b58e793af6e3337d8425dc7035d949cc2ac857;p=bitfield diff --git a/bitfield b/bitfield index c70c6c6..27605d3 100644 --- a/bitfield +++ b/bitfield @@ -15,8 +15,9 @@ from getopt import getopt, GetoptError # List of paths to look for configuration files. If a directory is specified, # it will be (recursively) scanned for .conf files. -configs = [os.path.join(os.getenv("HOME"), ".bitfields.conf"), - os.path.join(os.getenv("HOME"), ".bitfields.d")] +configs = ["/etc/bitfield.d", "/etc/bitfield", + os.path.join(os.getenv("HOME"), ".bitfield.d"), + os.path.join(os.getenv("HOME"), ".bitfield.conf")] class bitfield: def __init__(self, bits, name): @@ -226,7 +227,7 @@ def decode_value(reg, value, options): "for %d-bit register '%s'") % (value, reg.width, reg.id) return - print reg.decode(i, options.has_key('non_zero')) + print reg.decode(i, options['non-zero']) def main():