FAT: Fix some root directory logic that was conditionally done only for FAT32. Apparently this needs to be done for all FAT types. From Tridge via Lorenz Meier
This commit is contained in:
parent
2bfad60c85
commit
c9cb7972fb
|
@ -6442,3 +6442,8 @@
|
|||
* net/net_close.c: If CONFIG_NET_TCP_WRITE_BUFFERS is selected,
|
||||
then it is necessary to free the write buffere callback structure
|
||||
when the socket is closed (2014-1-14).
|
||||
* fs/fat/fs_fat32.c: Fix some root directory logic that was
|
||||
conditionally done only for FAT 32. Apparently this needs to
|
||||
done for all FAT types. From Tridge via Lorenz Meier
|
||||
(2014-1-14).
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/****************************************************************************
|
||||
* fs/fat/fs_fat32.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* References:
|
||||
|
@ -2119,7 +2119,7 @@ static int fat_mkdir(struct inode *mountpt, const char *relpath, mode_t mode)
|
|||
DIR_PUTFSTCLUSTLO(direntry, dircluster);
|
||||
|
||||
parentcluster = dirinfo.dir.fd_startcluster;
|
||||
if (fs->fs_type != FSTYPE_FAT32 && parentcluster == fs->fs_rootbase)
|
||||
if (parentcluster == fs->fs_rootbase)
|
||||
{
|
||||
parentcluster = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue