You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/15 08:18:59 UTC

[GitHub] [incubator-nuttx] mlyszczek commented on a diff in pull request #6605: fs/mount: "df -h" fixes regarding datatype sizes

mlyszczek commented on code in PR #6605:
URL: https://github.com/apache/incubator-nuttx/pull/6605#discussion_r921930843


##########
fs/mount/fs_procfs_mount.c:
##########
@@ -248,6 +248,10 @@ static int blocks_entry(FAR const char *mountpoint,
 
   if (!info->header)
     {
+#if defined(CONFIG_HAVE_LONG_LONG) && !defined(CONFIG_LIBC_LONG_LONG)
+      finfo("long long is enabled, but libc does not support it;\n"

Review Comment:
   #warning is not a good solution IMO. If I know what I'm doing (like 100% sure not using >4gb card) I wouldn't want to have warnings every time I compile code.
   
   If we have ll and no ll support in libc, we can detect overflow in runtime and then unconditionally print warning on stderr. Performance penalty is negligible - I mean, how often would you call df in production code?
   
   I suspect finfo won't be seen by anyone. Someone will see strange output, will start to investigate, a lot of people probably won't think about turning on finfo and will simply waste time.
   
   I think unconditional print to stderr about overflow is best - if we are going to fail, we should do it as soon as possible and as loud as possible, not close it behind multiple Kconfig options



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org