-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/fs : Add "vFAT" file system support in TizenRT #2827
base: master
Are you sure you want to change the base?
Conversation
Target : [0e0eea3431e81a59d49b7ae93b1db1b5049d5b08] - Code Rule Check (C++) OK. |
Target : [0e0eea3431e81a59d49b7ae93b1db1b5049d5b08] - Code Rule Check Result: |
os/fs/inode/inode.h
Outdated
*/ | ||
|
||
struct inode_search_s { | ||
FAR const char *path; /* Path of inode to find */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coding rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Done
os/include/sys/mount.h
Outdated
@@ -66,6 +66,7 @@ | |||
/**************************************************************************** | |||
* Included Files | |||
****************************************************************************/ | |||
#include <tinyara/compiler.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you include this header? Your new codes do not require it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I delete it
Please check
os/include/tinyara/fs/dirent.h
Outdated
off_t fd_startcluster; /* Start cluster number of the directory */ | ||
off_t fd_currcluster; /* Current cluster number being read */ | ||
off_t fd_currsector; /* Current sector being read */ | ||
unsigned int fd_index; /* Current index of the directory entry to read */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coding rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
os/include/tinyara/fs/fat.h
Outdated
#define FATATTR_ARCHIVE 0x20 | ||
|
||
#define FATATTR_LONGNAME \ | ||
(FATATTR_READONLY|FATATTR_HIDDEN|FATATTR_SYSTEM|FATATTR_VOLUMEID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coding rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
os/include/tinyara/fs/fat.h
Outdated
|
||
int fat_getattrib(FAR const char *path, FAR fat_attrib_t *attrib); | ||
int fat_setattrib(FAR const char *path, fat_attrib_t setbits, | ||
fat_attrib_t clearbits); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check this file for coding rule
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. please check
@NilabhShant Could you check is it ok for patent? |
os/fs/fat/Make.defs
Outdated
# | ||
########################################################################### | ||
############################################################################ | ||
# Make.defs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct Path >
os/fs/fat/Make.defs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, Modified.
Please check
0e0eea3
to
fe684ac
Compare
Target : [fe684acc626551a1018afa84355904cdc9a403c4] - Code Rule Check (C++) OK. |
Target : [fe684acc626551a1018afa84355904cdc9a403c4] - Code Rule Check OK. |
fe684ac
to
cea4041
Compare
Target : [cea4041483fdb1a9c95e954277a72b32af3c185a] - Code Rule Check (C++) OK. |
Target : [cea4041483fdb1a9c95e954277a72b32af3c185a] - Code Rule Check OK. |
os/fs/fat/fs_fat32.c
Outdated
|
||
/* Sanity checks */ | ||
|
||
DEBUGASSERT(filep->f_priv == NULL && filep->f_inode != NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also check for "filep" variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to check for it because if filep is NULL then its members will be NULL .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it might result in assertion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok Done
|
||
/* Synchronize the file buffers and disk content; update times */ | ||
|
||
ret = fat_sync(filep); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to check whether sync is successful?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is returning the status of sync at the end and this logic working fine in nuttx so its better to have it like this.
os/fs/fat/fs_fat32.c
Outdated
* both the "." and ".." entries. | ||
*/ | ||
|
||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct coding guideline violation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt | ||
# | ||
|
||
config FS_FAT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is only FAT32 is supported ? Or other versions too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my knowledge vFAT and FAT32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes only FAT32 support
cea4041
to
168c77a
Compare
Target : [168c77a8f7fde4579c7c518c842c6129ca84a2c8] - Code Rule Check (C++) OK. |
Target : [168c77a8f7fde4579c7c518c842c6129ca84a2c8] - Code Rule Check OK. |
* reserved. | ||
* Author: Gregory Nutt <[email protected]> | ||
* | ||
* References: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these references make sure that there will not be any licensing issues with this port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nuttx guys mention that it is an unrestricted license.
So I think there will be no license issues.
@sunghan-chang As I back-ported from Nuttx and it is also a open source and those guys mention below reference References:
But I am not very sure about it ,Please give me your opinion. |
os/fs/procfs/fs_procfs.c
Outdated
@@ -210,6 +210,7 @@ const struct mountpt_operations procfs_operations = { | |||
NULL, /* sync */ | |||
procfs_dup, /* dup */ | |||
NULL, /* fstat */ | |||
NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention funcptr variable in comment section as reference.
Like /* truncate */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok done, Please check
os/fs/smartfs/smartfs_smart.c
Outdated
@@ -145,6 +145,7 @@ const struct mountpt_operations smartfs_operations = { | |||
smartfs_sync, /* sync */ | |||
smartfs_dup, /* dup */ | |||
smartfs_fstat, /* fstat */ | |||
NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention funcptr variable in comment section as reference.
Like /* truncate */
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
168c77a
to
490c142
Compare
Target : [490c1425f316e2d8a2ea5a6a82cee985accddea6] - Code Rule Check (C++) OK. |
Target : [490c1425f316e2d8a2ea5a6a82cee985accddea6] - Code Rule Check OK. |
os/fs/fat/fs_fat32.h
Outdated
*/ | ||
/* 446@0: Generally unused and zero; but may | ||
* include IDM Boot Manager menu entry at 8@394 */ | ||
#define PART_ENTRY(n) (446+((n) << 4)) /* n = 0,1,2,3 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please correct coding guideline violations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
os/fs/fat/fs_fat32.h
Outdated
* Access to data in raw sector data */ | ||
|
||
#define UBYTE_VAL(p,o) (((uint8_t*)(p))[o]) | ||
#define UBYTE_PTR(p,o) &UBYTE_VAL(p,o) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, Please check
This patch adds support for vFAT file system on TizenRT back-ported from Nuttx Signed-off-by: Nilabh <[email protected]>
This patch adds requried support for vFAT file system in TizenRT. Back-ported from Nuttx Signed-off-by: Nilabh <[email protected]>
490c142
to
9008bc0
Compare
Target : [9008bc0] - Code Rule Check (C++) OK. |
Target : [9008bc0] - Code Rule Check OK. |
@sunghan-chang please review and approve this PR. |
Target : [9008bc0] - Code Rule Check (C++) OK. |
1 similar comment
Target : [9008bc0] - Code Rule Check (C++) OK. |
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt | ||
# | ||
|
||
config FS_FAT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes only FAT32 support
Target : [9008bc0] - Code Rule Check OK. |
Target : [9008bc0] - Code Rule Check (C++) OK. |
Target : [9008bc0] - Code Rule Check OK. |
1 similar comment
Target : [9008bc0] - Code Rule Check OK. |
This PR contains commits required to add vFAT file system in TizenRT and add functionality support for the same.
This patch has been back-ported from Nuttx.