diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-14 18:24:21 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-14 18:24:21 -0600 |
commit | 9fd46463c8c28c90abc0b29e7c5835841046795d (patch) | |
tree | 5a272eea37c053b56992f27c7d31019b14de55f7 | |
parent | 687245d6898eac03302b3f023090cb54c9e284c9 (diff) | |
download | nuttx-9fd46463c8c28c90abc0b29e7c5835841046795d.tar.gz nuttx-9fd46463c8c28c90abc0b29e7c5835841046795d.tar.bz2 nuttx-9fd46463c8c28c90abc0b29e7c5835841046795d.zip |
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
-rw-r--r-- | nuttx/ChangeLog | 5 | ||||
-rw-r--r-- | nuttx/fs/fat/fs_fat32.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 13d4bb777..061def0d3 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -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). + diff --git a/nuttx/fs/fat/fs_fat32.c b/nuttx/fs/fat/fs_fat32.c index cbbc3cd89..c26d9ee61 100644 --- a/nuttx/fs/fat/fs_fat32.c +++ b/nuttx/fs/fat/fs_fat32.c @@ -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; } |