[CRIU] [PATCH 2/2] zdtm:mnt_ext_dev: output a message if ZDTM_MNT_EXT_DEV is not set

Andrei Vagin avagin at virtuozzo.com
Mon Nov 21 10:01:59 PST 2016


On Mon, Nov 21, 2016 at 12:54:15PM +0300, Dmitrii Shcherbakov wrote:
> Should be easier to debug if the variable is not passed by accident.
>

Acked-by: Dmitrii Shcherbakov <dshcherbakov at virtuozzo.com>
> Signed-off-by: Dmitrii Shcherbakov <dshcherbakov at virtuozzo.com>
> ---
>  test/zdtm/static/mnt_ext_dev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/test/zdtm/static/mnt_ext_dev.c b/test/zdtm/static/mnt_ext_dev.c
> index 7c3bd56..a9ac013 100644
> --- a/test/zdtm/static/mnt_ext_dev.c
> +++ b/test/zdtm/static/mnt_ext_dev.c
> @@ -29,8 +29,10 @@ int main(int argc, char **argv)
>  
>  	mkdir(dirname, 0777);
>  	loop = getenv("ZDTM_MNT_EXT_DEV");
> -	if (loop == NULL)
> +	if (loop == NULL) {
> +		pr_perror("ZDTM_MNT_EXT_DEV is not set");
>  		return 1;
> +	}
>  
>  	if (mount(loop, dirname, "ext4", 0, NULL) == -1) {
>  		pr_perror("mount");
> -- 
> 2.7.4
> 


More information about the CRIU mailing list