resolved conflicts for merge of de28adf3 to mnc-dev-plus-aosp
Change-Id: I69f80ee5cba90b1516a35171a38d40cc79d07c19
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index e587590..6724d05 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -724,13 +724,14 @@
setup_requirements(reinterpret_cast<char*>(data), sz);
- for (size_t i = 0; i < ARRAY_SIZE(images); i++) {
+ for (size_t i = 0; i < ARRAY_SIZE(images); ++i) {
int fd = unzip_to_file(zip, images[i].img_name);
- if (fd < 0) {
- if (images[i].is_optional)
+ if (fd == -1) {
+ if (images[i].is_optional) {
continue;
+ }
CloseArchive(zip);
- die("update package missing %s", images[i].img_name);
+ exit(1); // unzip_to_file already explained why.
}
fastboot_buffer buf;
int rc = load_buf_fd(usb, fd, &buf);