mirror of https://github.com/vitalif/e2fsprogs
mke2fs.c: return error when failed to populate fs
We need return retval when "mke2fs -d" failed, otherwise the "$?" would be 0 which is misleading. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>crypto
parent
7a5081dc30
commit
2af0221537
|
@ -2990,10 +2990,11 @@ no_journal:
|
||||||
|
|
||||||
retval = populate_fs(fs, EXT2_ROOT_INO, root_dir,
|
retval = populate_fs(fs, EXT2_ROOT_INO, root_dir,
|
||||||
EXT2_ROOT_INO);
|
EXT2_ROOT_INO);
|
||||||
if (retval)
|
if (retval) {
|
||||||
fprintf(stderr, "%s",
|
com_err(program_name, retval, "%s",
|
||||||
_("\nError while populating file system"));
|
_("\nError while populating file system\n"));
|
||||||
else if (!quiet)
|
exit(1);
|
||||||
|
} else if (!quiet)
|
||||||
printf("%s", _("done\n"));
|
printf("%s", _("done\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue