ReactOS  0.4.15-dev-1033-gd7d716a
volume.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: drivers/fs/vfat/volume.c
5  * PURPOSE: VFAT Filesystem
6  * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com)
7  * Herve Poussineau (reactos@poussine.freesurf.fr)
8  */
9 
10 /* INCLUDES *****************************************************************/
11 
12 #include "vfat.h"
13 
14 #define NDEBUG
15 #include <debug.h>
16 
17 /* FUNCTIONS ****************************************************************/
18 
19 static
25 {
27  PDEVICE_EXTENSION DeviceExt;
28 
29  DPRINT("FsdGetFsVolumeInformation()\n");
30  DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
31  DPRINT("BufferLength %lu\n", *BufferLength);
32 
33  DPRINT("Required length %lu\n", FIELD_OFFSET(FILE_FS_VOLUME_INFORMATION, VolumeLabel) + DeviceObject->Vpb->VolumeLabelLength);
34  DPRINT("LabelLength %hu\n", DeviceObject->Vpb->VolumeLabelLength);
35  DPRINT("Label %.*S\n", DeviceObject->Vpb->VolumeLabelLength / sizeof(WCHAR), DeviceObject->Vpb->VolumeLabel);
36 
39 
40  DeviceExt = DeviceObject->DeviceExtension;
41 
42  /* valid entries */
43  FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
44  FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
45  if (*BufferLength < DeviceObject->Vpb->VolumeLabelLength)
46  {
48  RtlCopyMemory(FsVolumeInfo->VolumeLabel,
49  DeviceObject->Vpb->VolumeLabel,
50  *BufferLength);
51  }
52  else
53  {
55  RtlCopyMemory(FsVolumeInfo->VolumeLabel,
56  DeviceObject->Vpb->VolumeLabel,
57  FsVolumeInfo->VolumeLabelLength);
58  *BufferLength -= DeviceObject->Vpb->VolumeLabelLength;
59  }
60 
61  if (vfatVolumeIsFatX(DeviceExt))
62  {
64  DeviceExt->VolumeFcb->entry.FatX.CreationDate,
65  DeviceExt->VolumeFcb->entry.FatX.CreationTime,
66  &FsVolumeInfo->VolumeCreationTime);
67  }
68  else
69  {
71  DeviceExt->VolumeFcb->entry.Fat.CreationDate,
72  DeviceExt->VolumeFcb->entry.Fat.CreationTime,
73  &FsVolumeInfo->VolumeCreationTime);
74  }
75 
76  FsVolumeInfo->SupportsObjects = FALSE;
77 
78  DPRINT("Finished FsdGetFsVolumeInformation()\n");
79  DPRINT("BufferLength %lu\n", *BufferLength);
80 
81  return Status;
82 }
83 
84 
85 static
88  PDEVICE_EXTENSION DeviceExt,
89  PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
91 {
93  PCWSTR pName;
94  ULONG Length;
95 
96  DPRINT("FsdGetFsAttributeInformation()\n");
97  DPRINT("FsAttributeInfo = %p\n", FsAttributeInfo);
98  DPRINT("BufferLength %lu\n", *BufferLength);
99 
102 
103  if (DeviceExt->FatInfo.FatType == FAT32)
104  {
105  pName = L"FAT32";
106  }
107  else
108  {
109  pName = L"FAT";
110  }
111 
112  Length = wcslen(pName) * sizeof(WCHAR);
113  DPRINT("Required length %lu\n", (FIELD_OFFSET(FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName) + Length));
114 
115  if (*BufferLength < Length)
116  {
118  Length = *BufferLength;
119  }
120  else
121  {
123  }
124 
125  FsAttributeInfo->FileSystemAttributes =
127 
128  FsAttributeInfo->MaximumComponentNameLength = 255;
129 
130  FsAttributeInfo->FileSystemNameLength = Length;
131 
132  RtlCopyMemory(FsAttributeInfo->FileSystemName, pName, Length);
133 
134  DPRINT("Finished FsdGetFsAttributeInformation()\n");
135 
136  *BufferLength -= Length;
137  DPRINT("BufferLength %lu\n", *BufferLength);
138 
139  return Status;
140 }
141 
142 
143 static
144 NTSTATUS
147  PFILE_FS_SIZE_INFORMATION FsSizeInfo,
149 {
150  PDEVICE_EXTENSION DeviceExt;
152 
153  DPRINT("FsdGetFsSizeInformation()\n");
154  DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
155 
157 
158  DeviceExt = DeviceObject->DeviceExtension;
159  Status = CountAvailableClusters(DeviceExt, &FsSizeInfo->AvailableAllocationUnits);
160 
161  FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
162  FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
163  FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
164 
165  DPRINT("Finished FsdGetFsSizeInformation()\n");
166  if (NT_SUCCESS(Status))
168 
169  return Status;
170 }
171 
172 
173 static
174 NTSTATUS
177  PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
179 {
180  DPRINT("FsdGetFsDeviceInformation()\n");
181  DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
182  DPRINT("BufferLength %lu\n", *BufferLength);
183  DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
184 
186 
187  FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
188  FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
189 
190  DPRINT("FsdGetFsDeviceInformation() finished.\n");
191 
193  DPRINT("BufferLength %lu\n", *BufferLength);
194 
195  return STATUS_SUCCESS;
196 }
197 
198 
199 static
200 NTSTATUS
205 {
206  PDEVICE_EXTENSION DeviceExt;
208 
209  DPRINT("FsdGetFsFullSizeInformation()\n");
210  DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
211 
213 
214  DeviceExt = DeviceObject->DeviceExtension;
216 
217  FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
219  FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
220  FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
221 
222  DPRINT("Finished FsdGetFsFullSizeInformation()\n");
223  if (NT_SUCCESS(Status))
225 
226  return Status;
227 }
228 
229 
230 static
231 NTSTATUS
234  PFILE_FS_LABEL_INFORMATION FsLabelInfo)
235 {
236  PDEVICE_EXTENSION DeviceExt;
237  PVOID Context = NULL;
238  ULONG DirIndex = 0;
240  PVFATFCB pRootFcb;
242  BOOLEAN LabelFound = FALSE;
243  DIR_ENTRY VolumeLabelDirEntry;
244  ULONG VolumeLabelDirIndex;
245  ULONG LabelLen;
247  OEM_STRING StringO;
249  CHAR cString[43];
250  ULONG SizeDirEntry;
251  ULONG EntriesPerPage;
252  BOOLEAN IsFatX;
253 
254  DPRINT("FsdSetFsLabelInformation()\n");
255 
257  IsFatX = vfatVolumeIsFatX(DeviceExt);
258 
259  if (sizeof(DeviceObject->Vpb->VolumeLabel) < FsLabelInfo->VolumeLabelLength)
260  {
261  return STATUS_NAME_TOO_LONG;
262  }
263 
264  if (IsFatX)
265  {
266  if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 42)
267  return STATUS_NAME_TOO_LONG;
268 
269  SizeDirEntry = sizeof(FATX_DIR_ENTRY);
270  EntriesPerPage = FATX_ENTRIES_PER_PAGE;
271  }
272  else
273  {
274  if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 11)
275  return STATUS_NAME_TOO_LONG;
276 
277  SizeDirEntry = sizeof(FAT_DIR_ENTRY);
278  EntriesPerPage = FAT_ENTRIES_PER_PAGE;
279  }
280 
281  /* Create Volume label dir entry */
282  LabelLen = FsLabelInfo->VolumeLabelLength / sizeof(WCHAR);
283  RtlZeroMemory(&VolumeLabelDirEntry, SizeDirEntry);
284  StringW.Buffer = FsLabelInfo->VolumeLabel;
285  StringW.Length = StringW.MaximumLength = (USHORT)FsLabelInfo->VolumeLabelLength;
286  StringO.Buffer = cString;
287  StringO.Length = 0;
288  StringO.MaximumLength = 42;
290  if (!NT_SUCCESS(Status))
291  return Status;
292 
293  if (IsFatX)
294  {
295  RtlCopyMemory(VolumeLabelDirEntry.FatX.Filename, cString, LabelLen);
296  memset(&VolumeLabelDirEntry.FatX.Filename[LabelLen], ' ', 42 - LabelLen);
297  VolumeLabelDirEntry.FatX.Attrib = _A_VOLID;
298  }
299  else
300  {
301  RtlCopyMemory(VolumeLabelDirEntry.Fat.Filename, cString, max(sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen));
302  if (LabelLen > sizeof(VolumeLabelDirEntry.Fat.Filename))
303  {
304  memset(VolumeLabelDirEntry.Fat.Ext, ' ', sizeof(VolumeLabelDirEntry.Fat.Ext));
305  RtlCopyMemory(VolumeLabelDirEntry.Fat.Ext, cString + sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen - sizeof(VolumeLabelDirEntry.Fat.Filename));
306  }
307  else
308  {
309  memset(&VolumeLabelDirEntry.Fat.Filename[LabelLen], ' ', sizeof(VolumeLabelDirEntry.Fat.Filename) - LabelLen);
310  }
311  VolumeLabelDirEntry.Fat.Attrib = _A_VOLID;
312  }
313 
314  pRootFcb = vfatOpenRootFCB(DeviceExt);
315  Status = vfatFCBInitializeCacheFromVolume(DeviceExt, pRootFcb);
316  if (!NT_SUCCESS(Status))
317  {
318  return Status;
319  }
320 
321  /* Search existing volume entry on disk */
322  FileOffset.QuadPart = 0;
323  _SEH2_TRY
324  {
325  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
326  }
328  {
330  }
331  _SEH2_END;
332 
333  if (NT_SUCCESS(Status))
334  {
335  while (TRUE)
336  {
337  if (ENTRY_VOLUME(IsFatX, Entry))
338  {
339  /* Update entry */
340  LabelFound = TRUE;
341  RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
344  break;
345  }
346 
347  if (ENTRY_END(IsFatX, Entry))
348  {
349  break;
350  }
351 
352  DirIndex++;
353  Entry = (PDIR_ENTRY)((ULONG_PTR)Entry + SizeDirEntry);
354  if ((DirIndex % EntriesPerPage) == 0)
355  {
357  FileOffset.u.LowPart += PAGE_SIZE;
358  _SEH2_TRY
359  {
360  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
361  }
363  {
365  }
366  _SEH2_END;
367 
368  if (!NT_SUCCESS(Status))
369  {
370  Context = NULL;
371  break;
372  }
373  }
374  }
375 
376  if (Context)
377  {
379  }
380  }
381 
382  if (!LabelFound)
383  {
384  /* Add new entry for label */
385  if (!vfatFindDirSpace(DeviceExt, pRootFcb, 1, &VolumeLabelDirIndex))
387  else
388  {
389  FileOffset.u.HighPart = 0;
390  FileOffset.u.LowPart = VolumeLabelDirIndex * SizeDirEntry;
391 
393  _SEH2_TRY
394  {
395  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
396  }
398  {
400  }
401  _SEH2_END;
402 
403  if (NT_SUCCESS(Status))
404  {
405  RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
409  }
410  }
411  }
412 
413  vfatReleaseFCB(DeviceExt, pRootFcb);
414  if (!NT_SUCCESS(Status))
415  {
416  return Status;
417  }
418 
419  /* Update volume label in memory */
420  DeviceObject->Vpb->VolumeLabelLength = (USHORT)FsLabelInfo->VolumeLabelLength;
421  RtlCopyMemory(DeviceObject->Vpb->VolumeLabel, FsLabelInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabelLength);
422 
423  return Status;
424 }
425 
426 
427 /*
428  * FUNCTION: Retrieve the specified volume information
429  */
430 NTSTATUS
432  PVFAT_IRP_CONTEXT IrpContext)
433 {
436  PVOID SystemBuffer;
438 
439  /* PRECONDITION */
440  ASSERT(IrpContext);
441 
442  DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
443 
445  BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
446  {
447  DPRINT1("DirResource failed!\n");
448  return VfatMarkIrpContextForQueue(IrpContext);
449  }
450 
451  /* INITIALIZATION */
452  FsInformationClass = IrpContext->Stack->Parameters.QueryVolume.FsInformationClass;
453  BufferLength = IrpContext->Stack->Parameters.QueryVolume.Length;
454  SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
455 
456  DPRINT("FsInformationClass %d\n", FsInformationClass);
457  DPRINT("SystemBuffer %p\n", SystemBuffer);
458 
459  RtlZeroMemory(SystemBuffer, BufferLength);
460 
461  switch (FsInformationClass)
462  {
464  RC = FsdGetFsVolumeInformation(IrpContext->DeviceObject,
465  SystemBuffer,
466  &BufferLength);
467  break;
468 
471  SystemBuffer,
472  &BufferLength);
473  break;
474 
476  RC = FsdGetFsSizeInformation(IrpContext->DeviceObject,
477  SystemBuffer,
478  &BufferLength);
479  break;
480 
482  RC = FsdGetFsDeviceInformation(IrpContext->DeviceObject,
483  SystemBuffer,
484  &BufferLength);
485  break;
486 
488  RC = FsdGetFsFullSizeInformation(IrpContext->DeviceObject,
489  SystemBuffer,
490  &BufferLength);
491  break;
492 
493  default:
495  }
496 
498 
499  IrpContext->Irp->IoStatus.Information =
500  IrpContext->Stack->Parameters.QueryVolume.Length - BufferLength;
501 
502  return RC;
503 }
504 
505 
506 /*
507  * FUNCTION: Set the specified volume information
508  */
509 NTSTATUS
511  PVFAT_IRP_CONTEXT IrpContext)
512 {
515  PVOID SystemBuffer;
517  PIO_STACK_LOCATION Stack = IrpContext->Stack;
518 
519  /* PRECONDITION */
520  ASSERT(IrpContext);
521 
522  DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
523 
525  BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
526  {
527  return VfatMarkIrpContextForQueue(IrpContext);
528  }
529 
530  FsInformationClass = Stack->Parameters.SetVolume.FsInformationClass;
531  BufferLength = Stack->Parameters.SetVolume.Length;
532  SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
533 
534  DPRINT("FsInformationClass %d\n", FsInformationClass);
535  DPRINT("BufferLength %u\n", BufferLength);
536  DPRINT("SystemBuffer %p\n", SystemBuffer);
537 
538  switch (FsInformationClass)
539  {
542  SystemBuffer);
543  break;
544 
545  default:
547  }
548 
550  IrpContext->Irp->IoStatus.Information = 0;
551 
552  return Status;
553 }
554 
555 /* EOF */
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:263
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define FILE_DEVICE_DISK
Definition: winioctl.h:112
struct _FATDirEntry FAT_DIR_ENTRY
Definition: vfat.h:167
#define max(a, b)
Definition: svc.c:63
struct _FILE_FS_FULL_SIZE_INFORMATION FILE_FS_FULL_SIZE_INFORMATION
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ FS_INFORMATION_CLASS FsInformationClass
Definition: fltkernel.h:1329
#define ENTRY_END(IsFatX, DirEntry)
Definition: vfat.h:207
NTSTATUS CountAvailableClusters(PDEVICE_EXTENSION DeviceExt, PLARGE_INTEGER Clusters)
Definition: fat.c:539
struct _FATXDirEntry FATX_DIR_ENTRY
Definition: vfat.h:222
struct _Entry Entry
Definition: kefuncs.h:627
Definition: vfat.h:441
#define TRUE
Definition: types.h:120
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:510
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
Definition: cachesub.c:121
static NTSTATUS FsdGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_VOLUME_INFORMATION FsVolumeInfo, PULONG BufferLength)
Definition: volume.c:21
PVFATFCB vfatOpenRootFCB(PDEVICE_EXTENSION pVCB)
Definition: fcb.c:708
char CHAR
Definition: xmlstorage.h:175
#define FileFsFullSizeInformation
Definition: ntifs_ex.h:389
LONG NTSTATUS
Definition: precomp.h:26
unsigned char Filename[8]
Definition: vfat.h:114
VOID NTAPI CcUnpinData(IN PVOID Bcb)
Definition: pinsup.c:955
static NTSTATUS FsdGetFsDeviceInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, PULONG BufferLength)
Definition: volume.c:175
#define FAT_ENTRIES_PER_PAGE
Definition: vfat.h:219
#define PIN_WAIT
IO_STATUS_BLOCK IoStatus
STRING OEM_STRING
Definition: umtypes.h:203
FAT_DIR_ENTRY Fat
Definition: vfat.h:226
#define ENTRY_VOLUME(IsFatX, DirEntry)
Definition: vfat.h:206
_SEH2_TRY
Definition: create.c:4226
uint32_t ULONG_PTR
Definition: typedefs.h:65
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
static NTSTATUS FsdGetFsAttributeInformation(PDEVICE_EXTENSION DeviceExt, PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo, PULONG BufferLength)
Definition: volume.c:87
LARGE_INTEGER ActualAvailableAllocationUnits
Definition: from_kernel.h:272
unsigned char Attrib
Definition: vfat.h:117
#define FALSE
Definition: types.h:117
NTSTATUS VfatQueryVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:431
PFILE_OBJECT FileObject
Definition: vfat.h:493
LARGE_INTEGER AvailableAllocationUnits
Definition: from_kernel.h:264
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
static NTSTATUS FsdGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_SIZE_INFORMATION FsSizeInfo, PULONG BufferLength)
Definition: volume.c:145
PVOID DeviceExtension
Definition: env_spec_w32.h:418
static NTSTATUS FsdSetFsLabelInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_LABEL_INFORMATION FsLabelInfo)
Definition: volume.c:232
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define IRPCONTEXT_CANWAIT
Definition: vfat.h:569
static FsInfoType * FsVolumeInfo(char *fpath)
Definition: disk.c:974
void DPRINT(...)
Definition: polytest.cpp:61
#define STATUS_NAME_TOO_LONG
Definition: ntstatus.h:498
enum _FSINFOCLASS FS_INFORMATION_CLASS
FORCEINLINE BOOLEAN vfatVolumeIsFatX(PDEVICE_EXTENSION DeviceExt)
Definition: vfat.h:645
#define FILE_UNICODE_ON_DISK
Definition: from_kernel.h:235
static LPSTR pName
Definition: security.c:75
NTSTATUS vfatFCBInitializeCacheFromVolume(PVCB vcb, PVFATFCB fcb)
Definition: dirwr.c:24
#define FATX_ENTRIES_PER_PAGE
Definition: vfat.h:220
union _DIR_ENTRY * PDIR_ENTRY
Definition: vfat.h:230
__wchar_t WCHAR
Definition: xmlstorage.h:180
_In_ UCHAR BufferLength
Definition: scsi.h:4067
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
FORCEINLINE NTSTATUS VfatMarkIrpContextForQueue(PVFAT_IRP_CONTEXT IrpContext)
Definition: vfat.h:619
BOOLEAN FsdDosDateTimeToSystemTime(PDEVICE_EXTENSION DeviceExt, USHORT DosDate, USHORT DosTime, PLARGE_INTEGER SystemTime)
Definition: dir.c:22
#define _A_VOLID
Definition: dos.h:33
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
Definition: pinsup.c:802
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
FATX_DIR_ENTRY FatX
Definition: vfat.h:227
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define FILE_CASE_PRESERVED_NAMES
Definition: from_kernel.h:234
#define PAGE_SIZE
Definition: env_spec_w32.h:49
struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
static const WCHAR StringW[]
Definition: global.c:49
static NTSTATUS FsdGetFsFullSizeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_FULL_SIZE_INFORMATION FsSizeInfo, PULONG BufferLength)
Definition: volume.c:201
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1569
_SEH2_END
Definition: create.c:4400
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
unsigned char Filename[42]
Definition: vfat.h:173
unsigned short USHORT
Definition: pedump.c:61
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:159
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
unsigned int * PULONG
Definition: retypes.h:1
PDEVICE_OBJECT DeviceObject
Definition: vfat.h:578
Definition: vfat.h:224
#define FAT32
Definition: fat.h:169
BOOLEAN NTAPI ExAcquireResourceSharedLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:885
#define DPRINT1
Definition: precomp.h:8
#define STATUS_DISK_FULL
Definition: udferr_usr.h:155
unsigned char Ext[3]
Definition: vfat.h:114
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
ULONG Flags
Definition: vfat.h:580
VOID vfatReleaseFCB(PDEVICE_EXTENSION pVCB, PVFATFCB pFCB)
Definition: fcb.c:336
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2779
PIO_STACK_LOCATION Stack
Definition: vfat.h:582
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define memset(x, y, z)
Definition: compat.h:39
BOOLEAN vfatFindDirSpace(IN PDEVICE_EXTENSION DeviceExt, IN PVFATFCB pDirFcb, IN ULONG nbSlots, OUT PULONG start)
Definition: dirwr.c:260
struct _BEEP_DEVICE_EXTENSION * PDEVICE_EXTENSION
LARGE_INTEGER CallerAvailableAllocationUnits
Definition: from_kernel.h:271
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
unsigned char Attrib
Definition: vfat.h:172
base of all file and directory entries
Definition: entries.h:82
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1673
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:270
LONGLONG QuadPart
Definition: typedefs.h:114