summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJaehoon Chung <[email protected]>2022-06-20 20:13:54 +0900
committerMattijs Korpershoek <[email protected]>2023-11-21 15:28:15 +0100
commitf49062330967a549d2967242c36a2fe984b16b4e (patch)
treecbdfc87d46ad1e0b97fc2610bd2e13a0e6650b6c /include
parentdca7a8958f8d0dbd53072caa4353353e062d80ca (diff)
dfu: add CONFIG_DFU_NAME_MAX_SIZE configuration
Add CONFIG_DFU_NAME_MAX_SIZE to change the proper size. If name is longer than default size, it can do wrong behavior during updating image. So it need to change the proper maximum size. This patch is proviced the solution to change value with configuration. Signed-off-by: Jaehoon Chung <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Lukasz Majewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkorpershoek: fixed build errors for dfu.h includes] Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/dfu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dfu.h b/include/dfu.h
index 68b5ca46ce5..2f42781888a 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -98,7 +98,12 @@ struct virt_internal_data {
int dev_num;
};
+
+#if defined(CONFIG_DFU_NAME_MAX_SIZE)
+#define DFU_NAME_SIZE CONFIG_DFU_NAME_MAX_SIZE
+#else
#define DFU_NAME_SIZE 32
+#endif
#ifndef DFU_DEFAULT_POLL_TIMEOUT
#define DFU_DEFAULT_POLL_TIMEOUT 0
#endif