diff --git a/crit b/crit index 2758b0116..f054dcfef 100755 --- a/crit +++ b/crit @@ -17,6 +17,8 @@ def outf(opts): else: return sys.stdout +def dinf(opts, name): + return open(os.path.join(opts['dir'], name)) def decode(opts): indent = None @@ -46,6 +48,15 @@ def info(opts): json.dump(infs, sys.stdout, indent = 4) print +# +# Explorers +# + +explorers = { } + +def explore(opts): + explorers[opts['what']](opts) + def main(): desc = 'CRiu Image Tool' parser = argparse.ArgumentParser(description=desc, @@ -84,6 +95,12 @@ def main(): info_parser.add_argument("in") info_parser.set_defaults(func=info) + # Explore + x_parser = subparsers.add_parser('x', help = 'explore image dir') + x_parser.add_argument('dir') + x_parser.add_argument('what', choices = [ ]) + x_parser.set_defaults(func=explore) + # Show show_parser = subparsers.add_parser('show', help = "convert criu image from binary to human-readable json")