[CRIU] [PATCH 2/3] protobuf: Add ns.proto

Cyrill Gorcunov gorcunov at openvz.org
Tue May 14 17:26:25 EDT 2013


On Wed, May 15, 2013 at 01:19:00AM +0400, Pavel Emelyanov wrote:
> > 
> > Such &ns_desc_array[NS_TYPES__PID] better to do with some sane index name
> > rather than CLONE_, no?
> 
> Why CLONE_? In _this_ case it would look like
> 
>    nd = &pid_ns_desc;
> 
> which is nicer to read that what it is now.

Look, the array I provde keeps all signs -- the "pid" string,
which I use for procfs link parsing, the CLONE_ flag, needed
on restore, and the entry "type" I write to image. IOW I tried
to gather all things on one place, thus if one day we extend
nd_desc we only need to fix it in one place as well.

Otherwise I will have to duplicate "pid" stings -- one in
nd_desc, another one in proc link parsing (I'm using same
array when parse link name).


More information about the CRIU mailing list