+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2014 Broadcom Corporation.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <config.h>
if (is_sparse_image(download_buffer)) {
struct fb_mmc_sparse sparse_priv;
struct sparse_storage sparse;
+ int err;
sparse_priv.dev_desc = dev_desc;
sparse.size = info.size;
sparse.write = fb_mmc_sparse_write;
sparse.reserve = fb_mmc_sparse_reserve;
+ sparse.mssg = fastboot_fail;
printf("Flashing sparse image at offset " LBAFU "\n",
sparse.start);
sparse.priv = &sparse_priv;
- write_sparse_image(&sparse, cmd, download_buffer,
- download_bytes);
+ err = write_sparse_image(&sparse, cmd, download_buffer);
+ if (!err)
+ fastboot_okay("");
} else {
write_raw_image(dev_desc, &info, cmd, download_buffer,
download_bytes);