[CRIU] [PATCH] crit: add a `show` option for human consumption
Tycho Andersen
tycho.andersen at canonical.com
Wed Jul 22 09:49:42 PDT 2015
On Wed, Jul 22, 2015 at 07:47:41PM +0300, Pavel Emelyanov wrote:
> On 07/22/2015 07:05 PM, Tycho Andersen wrote:
> > On Wed, Jul 22, 2015 at 07:01:51PM +0300, Ruslan Kuprieiev wrote:
> >> But how about dropping -i option for it?
> >
> > This does drop the -i option (it's positional instead of optional)
>
> So what's the syntax for this new action? For decode it's
>
> decode [-i filename] [-o filename] [--pretty] <all other arguments are not allowed>
It's just,
crit show foo.img
>
> > Tycho
> >
> >> On 07/22/2015 06:55 PM, Tycho Andersen wrote:
> >>> This saves some keystrokes and is equivalent to decode --pretty.
> >>>
> >>> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
> >>> ---
> >>> crit | 6 ++++++
> >>> 1 file changed, 6 insertions(+)
> >>>
> >>> diff --git a/crit b/crit
> >>> index 350362c..ba586fa 100755
> >>> --- a/crit
> >>> +++ b/crit
> >>> @@ -73,6 +73,12 @@ def main():
> >>> help = 'where to put criu image in binary format (stdout by default)')
> >>> encode_parser.set_defaults(func=encode)
> >>> + # Show
> >>> + show_parser = subparsers.add_parser('show',
> >>> + help = "convert criu image from binary to human-readable json")
> >>> + show_parser.add_argument("in")
> >>> + show_parser.set_defaults(func=decode, pretty=True, out=None)
> >>> +
> >>> opts = vars(parser.parse_args())
> >>> opts["func"](opts)
> >>
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu
> > .
> >
>
More information about the CRIU
mailing list