[CRIU] [PATCH 3/3] lib: Use x[re|m]alloc, xstrdup helpers

Cyrill Gorcunov gorcunov at gmail.com
Tue Sep 23 10:17:36 PDT 2014


On Tue, Sep 23, 2014 at 09:08:38PM +0400, Pavel Emelyanov wrote:
> On 09/23/2014 09:00 PM, Cyrill Gorcunov wrote:
> 
> I doubt about this one. Do we want library to print memory
> allocation errors to unknown log?
> 
> And, btw, where from will libcriu.so get the print_on_level
> function?

We already use log helpers there

	perror("Can't allocate memory for criu opts");
	perror("Can't read response");
	...

but this is a good question. As far as I see pr_ helpers
remains unresolved indeed in library itself so it's up
to library user to provide print_on_level otherwise we
either

 1) link libcriu with our log engine
 2) eliminate all pr_ helpers from it


More information about the CRIU mailing list