[CRIU] [PATCH 2/2] protobuf: Move protobuf definitions to own files

Cyrill Gorcunov gorcunov at openvz.org
Tue May 7 15:29:47 EDT 2013


On Tue, May 07, 2013 at 11:13:57PM +0400, Pavel Emelyanov wrote:
> On 05/07/2013 11:10 PM, Cyrill Gorcunov wrote:
> > On Tue, May 07, 2013 at 10:50:37PM +0400, Pavel Emelyanov wrote:
> >>
> >> Here you need the cr_pb_message_desc thing (you remove 'static' from it) without
> >> the whole pb_read/write engine. Same as for fdsets in patch #1 -- I'd name it
> >> pb-io.c or smth like this, but don't understand why you need only parts of it.
> > 
> > I see, the reason the same -- I can't use protobuf code from crtools but had
> > to provide own minimal engine, 
> 
> What for? If crtools' engine provides what you need (and more) you should just
> use one.

Please, lets don't do that. For example protobuf.c uses read_fd_link which is
implemented in util.c, thus I need to compile util.c and try to use it in cpt2?
There will be a numerous things of external unresolved references. Frankly I
don't like the idea of uglifying both crtools and cpt2 in a sake of reuse.
The rule of thumb (I think) -- is to move abstract patrs to separate files
(C and H) and put some big note on top pointing that the files are used in
another projects and should not be bloated or contain references to external
routines. Agreed?


More information about the CRIU mailing list