[CRIU] Re: [PATCH 4/8] protobuf: Convert mnt_entry to PB engine

Pavel Emelyanov xemul at parallels.com
Tue Jul 17 06:13:57 EDT 2012


On 07/17/2012 12:52 PM, Cyrill Gorcunov wrote:
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  include/image.h    |   12 -----
>  mount.c            |  121 +++++++++++++++++++++------------------------------
>  protobuf/Makefile  |    1 +
>  protobuf/mnt.proto |   12 +++++
>  4 files changed, 63 insertions(+), 83 deletions(-)
>  create mode 100644 protobuf/mnt.proto
> 

>  		pr_debug("\t\tGetting root for %d\n", pm->mnt_id);
> -		if (read_img_str(img, &pm->root, me.root_dentry_len) < 0)
> -			break;
> +		pm->root = xstrdup(me->root);
> +		if (!pm->root)
> +			return -1;

Is there a special reason for xstrdup-ing instead of MntEntry carrying?


More information about the CRIU mailing list