22 #define UDF_BUG_CHECK_ID UDF_FILE_VOL_INFORMATION 113 Irp->IoStatus.Status = RC;
114 Irp->IoStatus.Information = 0;
167 UDFPrint((
"UDFCommonQueryVolInfo: \n"));
188 #ifdef UDF_ENABLE_SECURITY 190 Ccb->PreviouslyGrantedAccess,
199 #endif //UDF_ENABLE_SECURITY 243 Irp->IoStatus.Information = 0;
273 Irp->IoStatus.Status = RC;
312 UDFPrint((
" UDFQueryFsVolumeInfo: \n"));
314 Buffer->VolumeCreationTime.QuadPart =
Vcb->VolCreationTime;
315 Buffer->VolumeSerialNumber =
Vcb->PhSerialNumber;
361 UDFPrint((
" UDFQueryFsSizeInfo: \n"));
363 if(
Vcb->BitmapModified) {
364 Vcb->TotalAllocUnits =
366 Vcb->FreeAllocUnits =
370 Buffer->TotalAllocationUnits.QuadPart =
Vcb->TotalAllocUnits;
371 Buffer->AvailableAllocationUnits.QuadPart =
Vcb->FreeAllocUnits;
374 if(!
Buffer->TotalAllocationUnits.QuadPart)
375 Buffer->TotalAllocationUnits.QuadPart =
max(1,
Vcb->LastPossibleLBA);
376 Buffer->SectorsPerAllocationUnit =
Vcb->LBlockSize /
Vcb->BlockSize;
377 if(!
Buffer->SectorsPerAllocationUnit)
378 Buffer->SectorsPerAllocationUnit = 1;
380 if(!
Buffer->BytesPerSector)
381 Buffer->BytesPerSector = 2048;
383 UDFPrint((
" Space: Total %I64x, Free %I64x\n",
384 Buffer->TotalAllocationUnits.QuadPart,
385 Buffer->AvailableAllocationUnits.QuadPart));
413 UDFPrint((
" UDFQueryFsFullSizeInfo: \n"));
415 if(
Vcb->BitmapModified) {
416 Vcb->TotalAllocUnits =
418 Vcb->FreeAllocUnits =
419 Buffer->CallerAvailableAllocationUnits.QuadPart =
423 Buffer->TotalAllocationUnits.QuadPart =
Vcb->TotalAllocUnits;
424 Buffer->CallerAvailableAllocationUnits.QuadPart =
425 Buffer->ActualAvailableAllocationUnits.QuadPart =
Vcb->FreeAllocUnits;
427 if(!
Buffer->TotalAllocationUnits.QuadPart)
428 Buffer->TotalAllocationUnits.QuadPart =
max(1,
Vcb->LastPossibleLBA);
429 Buffer->SectorsPerAllocationUnit =
Vcb->LBlockSize /
Vcb->BlockSize;
430 if(!
Buffer->SectorsPerAllocationUnit)
431 Buffer->SectorsPerAllocationUnit = 1;
433 if(!
Buffer->BytesPerSector)
434 Buffer->BytesPerSector = 2048;
436 UDFPrint((
" Space: Total %I64x, Free %I64x\n",
437 Buffer->TotalAllocationUnits.QuadPart,
438 Buffer->ActualAvailableAllocationUnits.QuadPart));
466 UDFPrint((
" UDFQueryFsDeviceInfo: \n"));
475 Buffer->Characteristics =
Vcb->TargetDeviceObject->Characteristics;
477 Buffer->DeviceType =
Vcb->TargetDeviceObject->DeviceType;
478 UDFPrint((
" Characteristics %x, DeviceType %x\n",
Buffer->Characteristics,
Buffer->DeviceType));
507 ULONG FsTypeTitleLen;
510 UDFPrint((
" UDFQueryFsAttributeInfo: \n"));
518 #ifdef UDF_ENABLE_SECURITY
532 #define UDFSetFsTitle(tit) \ 533 FsTypeTitle = UDF_FS_TITLE_##tit; \ 534 FsTypeTitleLen = sizeof(UDF_FS_TITLE_##tit) - sizeof(WCHAR); 536 switch(
Vcb->TargetDeviceObject->DeviceType) {
597 if (*
Length >= FsTypeTitleLen) {
613 #ifndef UDF_READ_ONLY_BUILD 684 UDFPrint((
"UDFCommonSetVolInfo: \n"));
698 UDFPrint((
" Can't change Label on Non-volume object\n"));
708 UDFPrint((
" Can't change Label on blank volume ;)\n"));
720 #ifdef UDF_ENABLE_SECURITY 722 Ccb->PreviouslyGrantedAccess,
731 #endif //UDF_ENABLE_SECURITY 737 Irp->IoStatus.Information = 0;
743 Irp->IoStatus.Information = 0;
774 Irp->IoStatus.Status = RC;
804 UDFPrint((
" UDFSetLabelInfo: STATUS_INVALID_VOLUME_LABEL\n"));
815 Vcb->VolIdent.Buffer[
Buffer->VolumeLabelLength/
sizeof(
WCHAR)] = 0;
818 UDFPrint((
" UDFSetLabelInfo: OK\n"));
822 #endif //UDF_READ_ONLY_BUILD VOID UDFReleaseIrpContext(PtrUDFIrpContext PtrIrpContext)
PtrUDFIrpContext UDFAllocateIrpContext(PIRP Irp, PDEVICE_OBJECT PtrTargetDeviceObject)
#define CdMediaClass_DVDRAM
NTSTATUS NTAPI IoCheckFunctionAccess(IN ACCESS_MASK GrantedAccess, IN UCHAR MajorFunction, IN UCHAR MinorFunction, IN ULONG IoControlCode, IN PVOID ExtraData OPTIONAL, IN PVOID ExtraData2 OPTIONAL)
struct _FILE_FS_FULL_SIZE_INFORMATION FILE_FS_FULL_SIZE_INFORMATION
struct _UDFContextControlBlock * PtrUDFCCB
#define STATUS_INSUFFICIENT_RESOURCES
#define CdMediaClass_DVDpR
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define FsRtlEnterFileSystem
#define CdMediaClass_DVDR
#define FsRtlExitFileSystem
int64 __fastcall UDFGetFreeSpace(IN PVCB Vcb)
VOID UDFLogEvent(NTSTATUS UDFEventLogId, NTSTATUS RC)
#define STATUS_INVALID_PARAMETER
#define UDF_NODE_TYPE_VCB
#define UDFReleaseResource(Resource)
#define FileFsFullSizeInformation
#define CdMediaClass_DVDRW
#define UDFNtAclSupported(Vcb)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_VOLUME_LABEL
#define UDF_IRP_CONTEXT_CAN_BLOCK
_In_ UINT _In_ UINT BytesToCopy
#define UDF_DEFAULT_FE_CHARGE
#define UDF_VCB_FLAGS_RAW_DISK
#define FILE_DEVICE_CD_ROM
NTSTATUS UDFSetLabelInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_LABEL_INFORMATION Buffer, IN OUT PULONG Length)
#define UDF_VCB_FLAGS_VOLUME_READ_ONLY
_In_ PDEVICE_OBJECT DeviceObject
#define IO_DISK_INCREMENT
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
#define UDFSetFsTitle(tit)
#define CdMediaClass_DVDROM
#define _SEH2_GetExceptionInformation()
#define _SEH2_AbnormalTermination()
#define IoCompleteRequest
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
NTSTATUS UDFExceptionHandler(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
NTSTATUS UDFQueryFsDeviceInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_DEVICE_INFORMATION Buffer, IN OUT PULONG Length)
NTSTATUS NTAPI UDFQueryVolInfo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
#define UDF_VCB_SKIP_EJECT_CHECK
#define FILE_UNICODE_ON_DISK
#define NT_SUCCESS(StatCode)
#define FILE_CASE_SENSITIVE_SEARCH
NTSTATUS UDFQueryFsSizeInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_SIZE_INFORMATION Buffer, IN OUT PULONG Length)
PDEVICE_OBJECT DeviceObject
NTSTATUS UDFCommonQueryVolInfo(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
#define STATUS_ACCESS_DENIED
NTSTATUS UDFQueryFsAttributeInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_ATTRIBUTE_INFORMATION Buffer, IN OUT PULONG Length)
BOOLEAN __fastcall UDFIsIrpTopLevel(PIRP Irp)
#define FILE_NAMED_STREAMS
#define FILE_WRITE_ONCE_MEDIA
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
long UDFExceptionFilter(PtrUDFIrpContext PtrIrpContext, PEXCEPTION_POINTERS PtrExceptionPointers)
struct _FCB::@708::@711 Fcb
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
#define FILE_CASE_PRESERVED_NAMES
#define UDFAcquireResourceShared(Resource, CanWait)
VOID UDFFlushTryBreak(IN PVCB Vcb)
NTSTATUS UDFCommonSetVolInfo(PtrUDFIrpContext PtrIrpContext, PIRP Irp)
struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
#define UDF_VOL_LABEL_LEN
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
#define UDF_ERROR_INTERNAL_ERROR
NTSTATUS UDFPostRequest(IN PtrUDFIrpContext PtrIrpContext, IN PIRP Irp)
VOID UDFSetModified(IN PVCB Vcb)
#define FILE_SUPPORTS_SPARSE_FILES
#define STATUS_BUFFER_OVERFLOW
NTSTATUS NTAPI UDFSetVolInfo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
_In_ PIO_STACK_LOCATION IrpSp
#define CdMediaClass_CDROM
#define FIELD_OFFSET(t, f)
NTSTATUS UDFQueryFsVolumeInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_VOLUME_INFORMATION Buffer, IN OUT PULONG Length)
#define CdMediaClass_DVDpRW
NTSTATUS UDFQueryFsFullSizeInfo(IN PtrUDFIrpContext PtrIrpContext, IN PVCB Vcb, IN PFILE_FS_FULL_SIZE_INFORMATION Buffer, IN OUT PULONG Length)
#define UDFStreamsSupported(Vcb)
#define RtlZeroMemory(Destination, Length)
#define RtlCopyMemory(Destination, Source, Length)
#define FILE_PERSISTENT_ACLS
#define _SEH2_EXCEPT(...)
#define FILE_READ_ONLY_VOLUME
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
#define FILE_READ_ONLY_DEVICE
int64 __fastcall UDFGetTotalSpace(IN PVCB Vcb)