From 1e0df16e2085f343c41b4e80cd58aa98aa90157b Mon Sep 17 00:00:00 2001 From: Jin Qian Date: Wed, 23 Aug 2017 11:43:57 -0700 Subject: [PATCH] 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 --- fastboot/fastboot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index 49d943837..5f2267c63 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -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; }