This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new cf27f085f add const for romfs_img_len cf27f085f is described below commit cf27f085f56709ca5e1a31e4a91ca9e90dd69c79 Author: Yanfeng Liu <yfliu2...@qq.com> AuthorDate: Tue Jan 2 19:53:38 2024 +0800 add const for romfs_img_len this makes both declarations read-only as they are corelated. Signed-off-by: Yanfeng Liu <yfliu2...@qq.com> --- tools/mkromfsimg.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/mkromfsimg.sh b/tools/mkromfsimg.sh index 1287ef68e..45228a85f 100755 --- a/tools/mkromfsimg.sh +++ b/tools/mkromfsimg.sh @@ -57,11 +57,13 @@ genromfs -h 1>/dev/null 2>&1 || { \ # Now we are ready to make the ROMFS image -genromfs -f ${romfsimg} -d ${fsdir} -V "NuttXBootVol" || { echo "genromfs failed" ; exit 1 ; } +genromfs -f ${romfsimg} -d ${fsdir} -V "NuttXBootVol" || \ + { echo "genromfs failed" ; exit 1 ; } # And, finally, create the header file echo '#include <nuttx/compiler.h>' >${headerfile} -xxd -i ${romfsimg} | sed 's/^unsigned char/const unsigned char aligned_data(4)/g' >>${headerfile} || \ +xxd -i ${romfsimg} | sed -e 's/^unsigned /const unsigned /' \ + -e 's/char /char aligned_data(4) /' >>${headerfile} || \ { echo "ERROR: xxd of $< failed" ; rm -f ${romfsimg}; exit 1 ; } rm -f ${romfsimg}