From b5a1ab3d6e2002607f6c6387b0bf8a79cffc8224 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Fri, 31 Jan 2014 04:46:06 +0000 Subject: [PATCH] quick_dump: Add a file argument -f, or --file will simply dump the file in the specified format. All other options will be skipped. This is helpful when one wants to create their own list for temporary debug, or if one requires a subset of registers to work around things like fused off PCH. Signed-off-by: Ben Widawsky --- tools/quick_dump/quick_dump.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/quick_dump/quick_dump.py b/tools/quick_dump/quick_dump.py index 9af4345a..bace8c72 100755 --- a/tools/quick_dump/quick_dump.py +++ b/tools/quick_dump/quick_dump.py @@ -76,6 +76,8 @@ if __name__ == "__main__": parser.add_argument('-a', '--autodetect', action='store_true', default=False, help='autodetect chipset') + parser.add_argument('-f', '--file', + type=argparse.FileType('r'), default=None) parser.add_argument('profile', nargs='?', type=argparse.FileType('r'), default=None) @@ -88,6 +90,11 @@ if __name__ == "__main__": # Put us where the script is os.chdir(os.path.dirname(sys.argv[0])) + # specifying a file trumps all other things + if args.file != None: + parse_file(args.file) + sys.exit() + #parse anything named base_ these are assumed to apply for all gens. if args.baseless == False: walk_base_files()