[CRIU] Unused cli options

Adrian Reber adrian at lisas.de
Wed Aug 29 09:48:40 MSK 2018


On Tue, Aug 28, 2018 at 12:48:06PM +0100, Radostin Stoyanov wrote:
> On 27/08/18 21:52, Adrian Reber wrote:
> > On Sun, Aug 26, 2018 at 06:22:45PM +0100, Radostin Stoyanov wrote:
> >> I noticed that CRIU has several cli options (pid, contents, file,
> >> fields, ms)
> >> defined in config.c that are not being used.
> >>
> >> I was wondering if it is OK to remove them?
> > When I recently changed this code I did not remove this because it would
> > break existing CRIU integration.
> Yes, I saw your commit comments and I agree with you.
> 
> > Right now the options exist but are ignored. If you completely remove
> > them it would break CRIU invocations.
> >
> > I am not saying that they should not be removed, just stating why I did
> > not completely remove them.
> I am asking because, for example, the -c or --contents option was added
> back in 2011 with commit
> 
>     485c4b50d137174c8fc66ec3a7761b4f7c4e9f8c
>     show: Rework show procedure
> 
>     Added
> 
>      - ability to parse every single file crtools
>        understands via magic number
> 
>      - dumped memory pages can be rendered in two
>        modes -- as a simple set of pages' virtual addresses
>        or in hexdummp fashion (via -c command line key).
> 
>     For example
> 
>       ./crtools -s -c -f pages-2557.img

Looking at this example I think I agree that we actually could
completely remove '-c' and '-f' because I really doubt it will actually
break anything. It seems '-c' and '-f' only work with '-s'. But '-s'
right now is 'leave-stopped'. In the example above it use to be short
for '--show'. 'show', however, has been a command for some time and is
already deprecated for a long time, so the chance that complete removal
of '-c' and '-f' will break anything is really low. 

		Adrian

> 
>     CR_FD_PAGES: pages-2557.img
>     ----------------------------------------
>         7fffb44ace20: 00 00 00 00 00 00 00 00  00 00 00 74 65 73 74 2f 
>     |. . . . . . . .  . . . t e s t / |
>         7fffb44ace30: 74 65 73 74 2d 73 69 67  61 63 74 69 6f 6e 00 48 
>     |t e s t - s i g  a c t i o n . H |
>         7fffb44ace40: 4f 53 54 4e 41 4d 45 3d  6c 6f 63 61 6c 68 6f 73 
>     |O S T N A M E =  l o c a l h o s |
>         7fffb44ace50: 74 2e 6c 6f 63 61 6c 64  6f 6d 61 69 6e 00 54 45 
>     |t . l o c a l d  o m a i n . T E |
> 
> 
> Radostin


More information about the CRIU mailing list