patacongo commented on code in PR #9521:
URL: https://github.com/apache/nuttx/pull/9521#discussion_r1231204212
##########
include/sys/statfs.h:
##########
@@ -114,6 +114,10 @@ struct statfs
fsblkcnt_t f_bavail; /* Free blocks avail to non-superuser */
fsfilcnt_t f_files; /* Total file nodes in the file system */
fsfilcnt_t f_ffree; /* Free file nodes in the file system */
+ struct
+ {
+ int val[2];
+ } f_fsid; /* Encode device type, not yet in use */
Review Comment:
>> I think it is not common to have a struct defined inside other struct on
NuttX, shouldn't it better to define f_fsid as f_fsid_s outside of statfs
struct?
Structures defined within other structures is actually very common. There
are hundreds of examples. I would consider this a standard programming practice.
> @acassis I defined the structure in types.h without typedef. is that okay?
No. Please do not modify sys/types.h. The content of that file is controlled
by POSIX standards and should contain as few non-standard types as possible!!!
--
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]