zdtm:mnt_ext_dev: output a message if ZDTM_MNT_EXT_DEV is not set

Should be easier to debug if the variable is not passed by accident.

travis-ci: success for series starting with [1/2] zdtm:mnt_ext_auto: avoid segfault if ZDTM_NEWNS is not set
Signed-off-by: Dmitrii Shcherbakov <dshcherbakov@virtuozzo.com>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Dmitrii Shcherbakov 2016-11-21 12:54:15 +03:00 committed by Pavel Emelyanov
parent 99e77674a2
commit 1cadd1c3e8

View file

@ -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");