[PATCH 8/9] dosfs: Fix msdos_format()

Gedare Bloom gedare at rtems.org
Thu Jan 11 18:13:10 UTC 2018


From: Ralf Kirchner <ralf.kirchner at embedded-brains.de>

For FAT32 msdos_format() used to initialize first FAT entries to
non-zero values only if a volume label was given.  Absence of these
entries made mounting such a FAT32 volume fail.
---
 cpukit/libfs/src/dosfs/msdos_format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index 890fdd2..4e74662 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -1063,7 +1063,7 @@ int msdos_format
    * write FAT entry 1 as EOC
    * allocate directory in a FAT32 FS
    */
-  if ((ret_val == 0) && fmt_params.VolLabel_present){
+  if (ret_val == 0) {
     /*
      * empty sector: all clusters are free/do not link further on
      */
-- 
2.7.4




More information about the devel mailing list