summaryrefslogtreecommitdiffstats
path: root/common/filetype.c
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2016-02-17 12:28:20 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-03-11 08:06:05 +0100
commit0240fd3f8469eba3bda367b79dc221b9736baec7 (patch)
treeb6151ea4bf02df8b11d3ea3370d057a30c09a4f2 /common/filetype.c
parent24ff0ab0fa0354d74c03c6a1cfddb05c52d9d113 (diff)
downloadbarebox-0240fd3f8469eba3bda367b79dc221b9736baec7.tar.gz
fastboot: Add a ARM Barebox filetype handler
This will automatically call barebox_update for the transfered file if it is an ARM Barebox image and the destination file is defined by some update handler. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/filetype.c')
-rw-r--r--common/filetype.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/filetype.c b/common/filetype.c
index 8cfae88..74baf51 100644
--- a/common/filetype.c
+++ b/common/filetype.c
@@ -369,3 +369,16 @@ err_out:
cdev_close(cdev);
return type;
}
+
+bool filetype_is_barebox_image(enum filetype ft)
+{
+ switch (ft) {
+ case filetype_arm_barebox:
+ case filetype_mips_barebox:
+ case filetype_ch_image:
+ case filetype_ch_image_be:
+ return true;
+ default:
+ return false;
+ }
+}