xiaoxiang781216 commented on code in PR #17122:
URL: https://github.com/apache/nuttx/pull/17122#discussion_r2391152734
##########
binfmt/binfmt_loadmodule.c:
##########
@@ -122,6 +122,12 @@ static int load_absmodule(FAR struct binary_s *bin, FAR
const char *filename,
binfo("Successfully loaded module %s\n", filename);
+ /* Save the filename of the loaded module */
+
+#ifdef CONFIG_BINFMT_STORE_FILENAME
+ strlcpy(bin->fname, filename, sizeof(bin->fname));
Review Comment:
sizeof is better than NAME_MAX since it automatically match the new length
if someone change definition later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]