Fixed the 'REACTOS' volume label bug.
authorHartmut Birr <osexpert@googlemail.com>
Sat, 28 Jul 2001 07:05:56 +0000 (07:05 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sat, 28 Jul 2001 07:05:56 +0000 (07:05 +0000)
svn path=/trunk/; revision=2109

reactos/drivers/fs/vfat/direntry.c
reactos/drivers/fs/vfat/fcb.c
reactos/drivers/fs/vfat/vfat.h

index e0d07f6..b501224 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: direntry.c,v 1.2 2001/07/13 10:31:14 ekohl Exp $
+/* $Id: direntry.c,v 1.3 2001/07/28 07:05:56 hbirr Exp $
  *
  *
  * FILE:             DirEntry.c
  *
  *
  * FILE:             DirEntry.c
@@ -64,6 +64,12 @@ vfatIsDirEntryLongName (FATDirEntry * pFatDirEntry)
   return  pFatDirEntry->Attrib == 0x0f;
 }
 
   return  pFatDirEntry->Attrib == 0x0f;
 }
 
+BOOL
+vfatIsDirEntryVolume (FATDirEntry * pFatDirEntry)
+{
+  return pFatDirEntry->Attrib == 0x28;
+}
+
 void
 vfatGetDirEntryName (PFAT_DIR_ENTRY  dirEntry,  PWSTR  entryName)
 {
 void
 vfatGetDirEntryName (PFAT_DIR_ENTRY  dirEntry,  PWSTR  entryName)
 {
index ae9d041..b1c43cb 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fcb.c,v 1.7 2001/07/25 17:39:34 hbirr Exp $
+/* $Id: fcb.c,v 1.8 2001/07/28 07:05:56 hbirr Exp $
  *
  *
  * FILE:             fcb.c
  *
  *
  * FILE:             fcb.c
@@ -466,7 +466,8 @@ vfatDirFindFile (PDEVICE_EXTENSION  pDeviceExt,
             directoryIndex,
             currentLongName);
 
             directoryIndex,
             currentLongName);
 
-    if (!vfatIsDirEntryDeleted (&currentDirEntry))
+    if (!vfatIsDirEntryDeleted (&currentDirEntry)
+      && !vfatIsDirEntryVolume(&currentDirEntry))
     {
       if (currentLongName [0] != L'\0' && wstrcmpjoki (currentLongName, pFileToFind))
       {
     {
       if (currentLongName [0] != L'\0' && wstrcmpjoki (currentLongName, pFileToFind))
       {
index 7c86ff1..d1b0a86 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: vfat.h,v 1.33 2001/07/20 08:00:21 ekohl Exp $ */
+/* $Id: vfat.h,v 1.34 2001/07/28 07:05:56 hbirr Exp $ */
 
 #include <ddk/ntifs.h>
 
 
 #include <ddk/ntifs.h>
 
@@ -334,6 +334,7 @@ VfatOpenFile(PDEVICE_EXTENSION DeviceExt,
 ULONG  vfatDirEntryGetFirstCluster (PDEVICE_EXTENSION  pDeviceExt,
                                     PFAT_DIR_ENTRY  pDirEntry);
 BOOL  vfatIsDirEntryDeleted (FATDirEntry * pFatDirEntry);
 ULONG  vfatDirEntryGetFirstCluster (PDEVICE_EXTENSION  pDeviceExt,
                                     PFAT_DIR_ENTRY  pDirEntry);
 BOOL  vfatIsDirEntryDeleted (FATDirEntry * pFatDirEntry);
+BOOL  vfatIsDirEntryVolume (FATDirEntry * pFatDirEntry);
 void  vfatGetDirEntryName (PFAT_DIR_ENTRY pDirEntry,  PWSTR  pEntryName);
 NTSTATUS  vfatGetNextDirEntry (PDEVICE_EXTENSION  pDeviceExt,
                                PVFATFCB  pDirectoryFCB,
 void  vfatGetDirEntryName (PFAT_DIR_ENTRY pDirEntry,  PWSTR  pEntryName);
 NTSTATUS  vfatGetNextDirEntry (PDEVICE_EXTENSION  pDeviceExt,
                                PVFATFCB  pDirectoryFCB,