Changeset 1227
- Timestamp:
- 9/30/2009 3:21:28 AM (4 years ago)
- Location:
- trunk/eraser6
- Files:
-
- 2 edited
-
Eraser.Util.FileSystem/Fat16Api.cpp (modified) (2 diffs)
-
Eraser.Util/VolumeInfo.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.Util.FileSystem/Fat16Api.cpp
r1226 r1227 31 31 { 32 32 //Sanity checks: check that this volume is FAT16! 33 if (IsFat12() )33 if (IsFat12() || info->VolumeFormat == L"FAT12") 34 34 throw gcnew ArgumentException(L"The volume provided is not a FAT16 volume."); 35 35 } … … 38 38 { 39 39 //Sanity checks: check that this volume is FAT16! 40 if (IsFat12() )40 if (IsFat12() || info->VolumeFormat == L"FAT12") 41 41 throw gcnew ArgumentException(L"The volume provided is not a FAT16 volume."); 42 42 } -
trunk/eraser6/Eraser.Util/VolumeInfo.cs
r1223 r1227 119 119 VolumeLabel = volumeName.ToString(); 120 120 VolumeFormat = fileSystemName.ToString(); 121 122 //Determine whether it is FAT12 or FAT16 123 if (VolumeFormat == "FAT") 124 { 125 uint clusterSize, sectorSize, freeClusters, totalClusters; 126 if (KernelApi.NativeMethods.GetDiskFreeSpace(VolumeId, out clusterSize, 127 out sectorSize, out freeClusters, out totalClusters)) 128 { 129 if (totalClusters <= 0xFF0) 130 VolumeFormat += "12"; 131 else 132 VolumeFormat += "16"; 133 } 134 } 121 135 } 122 136 }
Note: See TracChangeset
for help on using the changeset viewer.
