exfat: optimize and fix compile warnring

Change-Id: I86f037e6929aacc9e4dffd3a88bf3abc90932a12
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong
2021-10-08 19:48:32 +08:00
parent 2d3fc26cf3
commit 725f98bb06
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -1,6 +1,8 @@
/* libexfat/config.h. Generated from config.h.in by configure. */
/* libexfat/config.h.in. Generated from configure.ac by autoheader. */
#include <nuttx/config.h>
/* Name of package */
#define PACKAGE "exfat"
@@ -44,3 +46,7 @@
/* Enable pread() and pwrite(). */
#define _XOPEN_SOURCE 500
#ifndef CONFIG_LIBC_LOCALTIME
void tzset(void);
#endif
+2 -2
View File
@@ -221,7 +221,7 @@ static int exfatfs_getpath(FAR struct inode *inode,
}
path += strlen(path);
exfat_get_name(node, path);
strcpy(path, node->name);
if (node->child)
{
strcat(path, "/");
@@ -930,7 +930,7 @@ static int exfatfs_readdir(FAR struct inode *mountpt,
dir->fd_dir.d_type = DTYPE_FILE;
}
exfat_get_name(priv->entry, dir->fd_dir.d_name);
strcpy(dir->fd_dir.d_name, priv->entry->name);
node = priv->entry;
priv->entry = exfat_readdir(&priv->it);
exfatfs_release_node(&fs->ef, node);