Re: Add g_ prefix to fs file_operations and mountpt_operations
On 4/24/2023 6:57 AM, Xiang Xiao wrote: From https://nuttx.apache.org/docs/latest/contributing/coding_style.html: - Global variable prefix. All global variables begin with the prefix g_ to indicate the scope of variable. Most global variables follow this guide except a few subsystem, which is fixed here: https://github.com/apache/nuttx/pull/9063 https://github.com/apache/nuttx/pull/9033 David suggests asking for consensus before merging, please give your opinion, thanks. These were merged two days ago.
Re: Add g_ prefix to fs file_operations and mountpt_operations
On 4/24/23, Xiang Xiao wrote: > From https://nuttx.apache.org/docs/latest/contributing/coding_style.html: > > >- > >Global variable prefix. All global variables begin with the prefix g_ to >indicate the scope of variable. > > Most global variables follow this guide except a few subsystem, which is > fixed here: > https://github.com/apache/nuttx/pull/9063 > https://github.com/apache/nuttx/pull/9033 > David suggests asking for consensus before merging, please give your > opinion, thanks. > I understand that all global variables should include g_ even when they are defined as static. Not only because it is a rule of the NX Style, but also because it makes clear that we are handling a global variable. BR, Alan
Add g_ prefix to fs file_operations and mountpt_operations
>From https://nuttx.apache.org/docs/latest/contributing/coding_style.html: - Global variable prefix. All global variables begin with the prefix g_ to indicate the scope of variable. Most global variables follow this guide except a few subsystem, which is fixed here: https://github.com/apache/nuttx/pull/9063 https://github.com/apache/nuttx/pull/9033 David suggests asking for consensus before merging, please give your opinion, thanks.