Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crit
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2015-12-14 13:19:00 +0300
committerPavel Emelyanov <xemul@parallels.com>2015-12-16 18:14:54 +0300
commit075c1c9f08b02122f1e08426e0798b8494c71587 (patch)
tree657af53a5110b52ecc67d02cf71804a21f181550 /crit
parentdcd750a64f7cd744ea753bc1663ef21383e33f4e (diff)
crit: Explore action and stubs
Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Appreciated-by: avagin@openvz.org
Diffstat (limited to 'crit')
-rwxr-xr-xcrit17
1 files changed, 17 insertions, 0 deletions
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")