fastboot: bail out if failed to generate fs image

we don't want to continue fastboot process if failed to
generate fs image. Print an error message and exit early.

Bug: 64915319
Change-Id: I5506d2a7a5063c188685633d6c3890239f9d658e
This commit is contained in:
Jin Qian 2017-08-23 11:43:57 -07:00
parent 7f16cad877
commit 1e0df16e20
1 changed files with 1 additions and 1 deletions

View File

@ -1463,7 +1463,7 @@ static void fb_perform_format(Transport* transport,
if (fs_generator_generate(gen, output.path, size, initial_dir,
eraseBlkSize, logicalBlkSize)) {
fprintf(stderr, "Cannot generate image: %s\n", strerror(errno));
die("Cannot generate image for %s\n", partition);
return;
}