[PATCH 3/3] ARM: Rockchip: bbu: allow forcing barebox update handler despite size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


The update handler correctly refuses to write a bootloader when it would
interfere with partitioning.

Depending on use case, the user may want to override this check though,
so allow the barebox update force parameter to override it.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
 arch/arm/mach-rockchip/bbu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-rockchip/bbu.c b/arch/arm/mach-rockchip/bbu.c
index f9681aad1aa4..f15b32937c3e 100644
--- a/arch/arm/mach-rockchip/bbu.c
+++ b/arch/arm/mach-rockchip/bbu.c
@@ -63,9 +63,9 @@ static int rockchip_bbu_mmc_handler(struct bbu_handler *handler,
 	space = cdev_unallocated_space(cdev_by_name(cdevname));
 	if (space < IMG_OFFSET_0 + data->len) {
-		pr_err("Unallocated space on %s (%lld) is too small for one image\n",
-		       data->devicefile, space);
-		return -ENOSPC;
+		if (!bbu_force(data, "Unallocated space on %s (%lld) is too small for one image\n",
+			       data->devicefile, space))
+			return -ENOSPC;
 	fd = open(data->devicefile, O_WRONLY);

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux