ReactOS  0.4.14-dev-599-g2d4d3f5
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  *BufferLength = 0;
52  }
53  else
54  {
56  RtlCopyMemory(FsVolumeInfo->VolumeLabel,
57  DeviceObject->Vpb->VolumeLabel,
58  FsVolumeInfo->VolumeLabelLength);
59  *BufferLength -= DeviceObject->Vpb->VolumeLabelLength;
60  }
61 
62  if (vfatVolumeIsFatX(DeviceExt))
63  {
65  DeviceExt->VolumeFcb->entry.FatX.CreationDate,
66  DeviceExt->VolumeFcb->entry.FatX.CreationTime,
67  &FsVolumeInfo->VolumeCreationTime);
68  }
69  else
70  {
72  DeviceExt->VolumeFcb->entry.Fat.CreationDate,
73  DeviceExt->VolumeFcb->entry.Fat.CreationTime,
74  &FsVolumeInfo->VolumeCreationTime);
75  }
76 
77  FsVolumeInfo->SupportsObjects = FALSE;
78 
79  DPRINT("Finished FsdGetFsVolumeInformation()\n");
80  DPRINT("BufferLength %lu\n", *BufferLength);
81 
82  return Status;
83 }
84 
85 
86 static
89  PDEVICE_EXTENSION DeviceExt,
90  PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
92 {
94  PCWSTR pName;
95  ULONG Length;
96 
97  DPRINT("FsdGetFsAttributeInformation()\n");
98  DPRINT("FsAttributeInfo = %p\n", FsAttributeInfo);
99  DPRINT("BufferLength %lu\n", *BufferLength);
100 
103 
104  if (DeviceExt->FatInfo.FatType == FAT32)
105  {
106  pName = L"FAT32";
107  }
108  else
109  {
110  pName = L"FAT";
111  }
112 
113  Length = wcslen(pName) * sizeof(WCHAR);
114  DPRINT("Required length %lu\n", (FIELD_OFFSET(FILE_FS_ATTRIBUTE_INFORMATION, FileSystemName) + Length));
115 
116  if (*BufferLength < Length)
117  {
119  Length = *BufferLength;
120  }
121  else
122  {
124  }
125 
126  FsAttributeInfo->FileSystemAttributes =
128 
129  FsAttributeInfo->MaximumComponentNameLength = 255;
130 
131  FsAttributeInfo->FileSystemNameLength = Length;
132 
133  RtlCopyMemory(FsAttributeInfo->FileSystemName, pName, Length);
134 
135  DPRINT("Finished FsdGetFsAttributeInformation()\n");
136 
137  *BufferLength -= Length;
138  DPRINT("BufferLength %lu\n", *BufferLength);
139 
140  return Status;
141 }
142 
143 
144 static
145 NTSTATUS
148  PFILE_FS_SIZE_INFORMATION FsSizeInfo,
150 {
151  PDEVICE_EXTENSION DeviceExt;
153 
154  DPRINT("FsdGetFsSizeInformation()\n");
155  DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
156 
158 
159  DeviceExt = DeviceObject->DeviceExtension;
160  Status = CountAvailableClusters(DeviceExt, &FsSizeInfo->AvailableAllocationUnits);
161 
162  FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
163  FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
164  FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
165 
166  DPRINT("Finished FsdGetFsSizeInformation()\n");
167  if (NT_SUCCESS(Status))
169 
170  return Status;
171 }
172 
173 
174 static
175 NTSTATUS
178  PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
180 {
181  DPRINT("FsdGetFsDeviceInformation()\n");
182  DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
183  DPRINT("BufferLength %lu\n", *BufferLength);
184  DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
185 
187 
188  FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
189  FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
190 
191  DPRINT("FsdGetFsDeviceInformation() finished.\n");
192 
194  DPRINT("BufferLength %lu\n", *BufferLength);
195 
196  return STATUS_SUCCESS;
197 }
198 
199 
200 static
201 NTSTATUS
206 {
207  PDEVICE_EXTENSION DeviceExt;
209 
210  DPRINT("FsdGetFsFullSizeInformation()\n");
211  DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
212 
214 
215  DeviceExt = DeviceObject->DeviceExtension;
217 
218  FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->FatInfo.NumberOfClusters;
220  FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->FatInfo.SectorsPerCluster;
221  FsSizeInfo->BytesPerSector = DeviceExt->FatInfo.BytesPerSector;
222 
223  DPRINT("Finished FsdGetFsFullSizeInformation()\n");
224  if (NT_SUCCESS(Status))
226 
227  return Status;
228 }
229 
230 
231 static
232 NTSTATUS
235  PFILE_FS_LABEL_INFORMATION FsLabelInfo)
236 {
237  PDEVICE_EXTENSION DeviceExt;
238  PVOID Context = NULL;
239  ULONG DirIndex = 0;
241  PVFATFCB pRootFcb;
243  BOOLEAN LabelFound = FALSE;
244  DIR_ENTRY VolumeLabelDirEntry;
245  ULONG VolumeLabelDirIndex;
246  ULONG LabelLen;
248  OEM_STRING StringO;
250  CHAR cString[43];
251  ULONG SizeDirEntry;
252  ULONG EntriesPerPage;
253  BOOLEAN IsFatX;
254 
255  DPRINT("FsdSetFsLabelInformation()\n");
256 
258  IsFatX = vfatVolumeIsFatX(DeviceExt);
259 
260  if (sizeof(DeviceObject->Vpb->VolumeLabel) < FsLabelInfo->VolumeLabelLength)
261  {
262  return STATUS_NAME_TOO_LONG;
263  }
264 
265  if (IsFatX)
266  {
267  if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 42)
268  return STATUS_NAME_TOO_LONG;
269 
270  SizeDirEntry = sizeof(FATX_DIR_ENTRY);
271  EntriesPerPage = FATX_ENTRIES_PER_PAGE;
272  }
273  else
274  {
275  if (FsLabelInfo->VolumeLabelLength / sizeof(WCHAR) > 11)
276  return STATUS_NAME_TOO_LONG;
277 
278  SizeDirEntry = sizeof(FAT_DIR_ENTRY);
279  EntriesPerPage = FAT_ENTRIES_PER_PAGE;
280  }
281 
282  /* Create Volume label dir entry */
283  LabelLen = FsLabelInfo->VolumeLabelLength / sizeof(WCHAR);
284  RtlZeroMemory(&VolumeLabelDirEntry, SizeDirEntry);
285  StringW.Buffer = FsLabelInfo->VolumeLabel;
286  StringW.Length = StringW.MaximumLength = (USHORT)FsLabelInfo->VolumeLabelLength;
287  StringO.Buffer = cString;
288  StringO.Length = 0;
289  StringO.MaximumLength = 42;
291  if (!NT_SUCCESS(Status))
292  return Status;
293 
294  if (IsFatX)
295  {
296  RtlCopyMemory(VolumeLabelDirEntry.FatX.Filename, cString, LabelLen);
297  memset(&VolumeLabelDirEntry.FatX.Filename[LabelLen], ' ', 42 - LabelLen);
298  VolumeLabelDirEntry.FatX.Attrib = _A_VOLID;
299  }
300  else
301  {
302  RtlCopyMemory(VolumeLabelDirEntry.Fat.Filename, cString, max(sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen));
303  if (LabelLen > sizeof(VolumeLabelDirEntry.Fat.Filename))
304  {
305  memset(VolumeLabelDirEntry.Fat.Ext, ' ', sizeof(VolumeLabelDirEntry.Fat.Ext));
306  RtlCopyMemory(VolumeLabelDirEntry.Fat.Ext, cString + sizeof(VolumeLabelDirEntry.Fat.Filename), LabelLen - sizeof(VolumeLabelDirEntry.Fat.Filename));
307  }
308  else
309  {
310  memset(&VolumeLabelDirEntry.Fat.Filename[LabelLen], ' ', sizeof(VolumeLabelDirEntry.Fat.Filename) - LabelLen);
311  }
312  VolumeLabelDirEntry.Fat.Attrib = _A_VOLID;
313  }
314 
315  pRootFcb = vfatOpenRootFCB(DeviceExt);
316  Status = vfatFCBInitializeCacheFromVolume(DeviceExt, pRootFcb);
317  if (!NT_SUCCESS(Status))
318  {
319  return Status;
320  }
321 
322  /* Search existing volume entry on disk */
323  FileOffset.QuadPart = 0;
324  _SEH2_TRY
325  {
326  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
327  }
329  {
331  }
332  _SEH2_END;
333 
334  if (NT_SUCCESS(Status))
335  {
336  while (TRUE)
337  {
338  if (ENTRY_VOLUME(IsFatX, Entry))
339  {
340  /* Update entry */
341  LabelFound = TRUE;
342  RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
345  break;
346  }
347 
348  if (ENTRY_END(IsFatX, Entry))
349  {
350  break;
351  }
352 
353  DirIndex++;
354  Entry = (PDIR_ENTRY)((ULONG_PTR)Entry + SizeDirEntry);
355  if ((DirIndex % EntriesPerPage) == 0)
356  {
358  FileOffset.u.LowPart += PAGE_SIZE;
359  _SEH2_TRY
360  {
361  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
362  }
364  {
366  }
367  _SEH2_END;
368 
369  if (!NT_SUCCESS(Status))
370  {
371  Context = NULL;
372  break;
373  }
374  }
375  }
376 
377  if (Context)
378  {
380  }
381  }
382 
383  if (!LabelFound)
384  {
385  /* Add new entry for label */
386  if (!vfatFindDirSpace(DeviceExt, pRootFcb, 1, &VolumeLabelDirIndex))
388  else
389  {
390  FileOffset.u.HighPart = 0;
391  FileOffset.u.LowPart = VolumeLabelDirIndex * SizeDirEntry;
392 
394  _SEH2_TRY
395  {
396  CcPinRead(pRootFcb->FileObject, &FileOffset, SizeDirEntry, PIN_WAIT, &Context, (PVOID*)&Entry);
397  }
399  {
401  }
402  _SEH2_END;
403 
404  if (NT_SUCCESS(Status))
405  {
406  RtlCopyMemory(Entry, &VolumeLabelDirEntry, SizeDirEntry);
410  }
411  }
412  }
413 
414  vfatReleaseFCB(DeviceExt, pRootFcb);
415  if (!NT_SUCCESS(Status))
416  {
417  return Status;
418  }
419 
420  /* Update volume label in memory */
421  DeviceObject->Vpb->VolumeLabelLength = (USHORT)FsLabelInfo->VolumeLabelLength;
422  RtlCopyMemory(DeviceObject->Vpb->VolumeLabel, FsLabelInfo->VolumeLabel, DeviceObject->Vpb->VolumeLabelLength);
423 
424  return Status;
425 }
426 
427 
428 /*
429  * FUNCTION: Retrieve the specified volume information
430  */
431 NTSTATUS
433  PVFAT_IRP_CONTEXT IrpContext)
434 {
437  PVOID SystemBuffer;
439 
440  /* PRECONDITION */
441  ASSERT(IrpContext);
442 
443  DPRINT("VfatQueryVolumeInformation(IrpContext %p)\n", IrpContext);
444 
446  BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
447  {
448  DPRINT1("DirResource failed!\n");
449  return VfatMarkIrpContextForQueue(IrpContext);
450  }
451 
452  /* INITIALIZATION */
453  FsInformationClass = IrpContext->Stack->Parameters.QueryVolume.FsInformationClass;
454  BufferLength = IrpContext->Stack->Parameters.QueryVolume.Length;
455  SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
456 
457  DPRINT("FsInformationClass %d\n", FsInformationClass);
458  DPRINT("SystemBuffer %p\n", SystemBuffer);
459 
460  switch (FsInformationClass)
461  {
463  RC = FsdGetFsVolumeInformation(IrpContext->DeviceObject,
464  SystemBuffer,
465  &BufferLength);
466  break;
467 
470  SystemBuffer,
471  &BufferLength);
472  break;
473 
475  RC = FsdGetFsSizeInformation(IrpContext->DeviceObject,
476  SystemBuffer,
477  &BufferLength);
478  break;
479 
481  RC = FsdGetFsDeviceInformation(IrpContext->DeviceObject,
482  SystemBuffer,
483  &BufferLength);
484  break;
485 
487  RC = FsdGetFsFullSizeInformation(IrpContext->DeviceObject,
488  SystemBuffer,
489  &BufferLength);
490  break;
491 
492  default:
494  }
495 
497 
498  IrpContext->Irp->IoStatus.Information =
499  IrpContext->Stack->Parameters.QueryVolume.Length - BufferLength;
500 
501  return RC;
502 }
503 
504 
505 /*
506  * FUNCTION: Set the specified volume information
507  */
508 NTSTATUS
510  PVFAT_IRP_CONTEXT IrpContext)
511 {
514  PVOID SystemBuffer;
516  PIO_STACK_LOCATION Stack = IrpContext->Stack;
517 
518  /* PRECONDITION */
519  ASSERT(IrpContext);
520 
521  DPRINT("VfatSetVolumeInformation(IrpContext %p)\n", IrpContext);
522 
524  BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT)))
525  {
526  return VfatMarkIrpContextForQueue(IrpContext);
527  }
528 
529  FsInformationClass = Stack->Parameters.SetVolume.FsInformationClass;
530  BufferLength = Stack->Parameters.SetVolume.Length;
531  SystemBuffer = IrpContext->Irp->AssociatedIrp.SystemBuffer;
532 
533  DPRINT("FsInformationClass %d\n", FsInformationClass);
534  DPRINT("BufferLength %u\n", BufferLength);
535  DPRINT("SystemBuffer %p\n", SystemBuffer);
536 
537  switch (FsInformationClass)
538  {
541  SystemBuffer);
542  break;
543 
544  default:
546  }
547 
549  IrpContext->Irp->IoStatus.Information = 0;
550 
551  return Status;
552 }
553 
554 /* EOF */
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:263
const uint16_t * PCWSTR
Definition: typedefs.h:55
#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
#define TRUE
Definition: types.h:120
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:640
Definition: vfat.h:441
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
NTSTATUS VfatSetVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:509
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:176
#define FAT_ENTRIES_PER_PAGE
Definition: vfat.h:219
#define PIN_WAIT
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:4250
uint32_t ULONG_PTR
Definition: typedefs.h:63
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:88
LARGE_INTEGER ActualAvailableAllocationUnits
Definition: from_kernel.h:272
unsigned char Attrib
Definition: vfat.h:117
_In_ ULONG BufferLength
Definition: usbdlib.h:225
NTSTATUS VfatQueryVolumeInformation(PVFAT_IRP_CONTEXT IrpContext)
Definition: volume.c:432
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:146
PVOID DeviceExtension
Definition: env_spec_w32.h:418
static NTSTATUS FsdSetFsLabelInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_LABEL_INFORMATION FsLabelInfo)
Definition: volume.c:233
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:484
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
#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
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
Status
Definition: gdiplustypes.h:24
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:202
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
_SEH2_END
Definition: create.c:4424
#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:151
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
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:409
unsigned int ULONG
Definition: retypes.h:1
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
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:2772
PIO_STACK_LOCATION Stack
Definition: vfat.h:582
return STATUS_SUCCESS
Definition: btrfs.c:2938
#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:1664
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:270
LONGLONG QuadPart
Definition: typedefs.h:112