You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "hartmannathan (via GitHub)" <gi...@apache.org> on 2023/04/04 15:46:23 UTC
[GitHub] [nuttx] hartmannathan commented on pull request #8939: fs: Flush the file system cache in BOARDIOC_POWEROFF too
hartmannathan commented on PR #8939:
URL: https://github.com/apache/nuttx/pull/8939#issuecomment-1496209742
> > `SYS_DOWN` does not need `sync()`?
>
> `SYS_DOWN` will call `sync()` since it uses the same value as `SYS_RESTART`:
>
> ```c
> #define SYS_RESTART SYS_DOWN
> ```
>
> But IMO, this hurts the maintenability of the project. What if someone changes this `define` in the future?
>
> Maybe it is better to change it to:
>
> ```c
> if (action == SYS_POWER_OFF || action == SYS_DOWN || action == SYS_RESTART)
> ```
>
> so we don't depend on these two macros having the same value?
+1
--
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