[CRIU] [PATCH 13/32] tools: cpt2 -- Introduce "object" abstraction

Cyrill Gorcunov gorcunov at openvz.org
Mon Apr 1 06:45:54 EDT 2013


On Mon, Apr 01, 2013 at 02:24:42PM +0400, Pavel Emelyanov wrote:
> > +extern int read_obj_cont(int fd, void *p, size_t size);
> > +
> > +#define read_obj_cont(fd, p)						\
> > +({									\
> > +	int __ret = -1;							\
> > +	void *__p = (void *)(p) + sizeof(struct cpt_object_hdr);	\
> > +	u64 __size = sizeof(*p) - sizeof(struct cpt_object_hdr);	\
> > +									\
> > +	if (read_data(fd, __p, __size, false) == 0)			\
> > +		__ret = 0;						\
> > +	else								\
> > +		pr_err("Can't read object payload\n");			\
> > +									\
> > +	__ret;								\
> > +})
> 
> Huh?

Typo, thanks!


More information about the CRIU mailing list