Commit 76a9fa12 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Types and partial implementation for NtQueryVolumeInformationFile.

parent a44e0b0f
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "ntdll_misc.h" #include "ntdll_misc.h"
#include "ntddk.h" #include "ntddk.h"
#include "winioctl.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll); WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
...@@ -252,7 +253,85 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile ( ...@@ -252,7 +253,85 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile (
IN ULONG Length, IN ULONG Length,
IN FS_INFORMATION_CLASS FSInformationClass) IN FS_INFORMATION_CLASS FSInformationClass)
{ {
ULONG len = 0;
FIXME("(0x%08x %p %p 0x%08lx 0x%08x) stub!\n", FIXME("(0x%08x %p %p 0x%08lx 0x%08x) stub!\n",
FileHandle, IoStatusBlock, FSInformation, Length, FSInformationClass); FileHandle, IoStatusBlock, FSInformation, Length, FSInformationClass);
switch ( FSInformationClass )
{
case FileFsVolumeInformation:
len = sizeof( FILE_FS_VOLUME_INFORMATION );
break;
case FileFsLabelInformation:
len = 0;
break;
case FileFsSizeInformation:
len = sizeof( FILE_FS_SIZE_INFORMATION );
break;
case FileFsDeviceInformation:
len = sizeof( FILE_FS_DEVICE_INFORMATION );
break;
case FileFsAttributeInformation:
len = sizeof( FILE_FS_ATTRIBUTE_INFORMATION );
break;
case FileFsControlInformation:
len = 0;
break;
case FileFsFullSizeInformation:
len = 0;
break;
case FileFsObjectIdInformation:
len = 0;
break;
case FileFsMaximumInformation:
len = 0;
break;
}
if (Length < len)
return STATUS_BUFFER_TOO_SMALL;
switch ( FSInformationClass )
{
case FileFsVolumeInformation:
break;
case FileFsLabelInformation:
break;
case FileFsSizeInformation:
break;
case FileFsDeviceInformation:
if (FSInformation)
{
FILE_FS_DEVICE_INFORMATION * DeviceInfo = FSInformation;
DeviceInfo->DeviceType = FILE_DEVICE_DISK;
DeviceInfo->Characteristics = 0;
break;
};
case FileFsAttributeInformation:
break;
case FileFsControlInformation:
break;
case FileFsFullSizeInformation:
break;
case FileFsObjectIdInformation:
break;
case FileFsMaximumInformation:
break;
}
IoStatusBlock->DUMMYUNIONNAME.Status = STATUS_SUCCESS;
IoStatusBlock->Information = len;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
#define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034 #define FILE_DEVICE_FULLSCREEN_VIDEO 0x00000034
#define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035 #define FILE_DEVICE_DFS_FILE_SYSTEM 0x00000035
#define FILE_DEVICE_DFS_VOLUME 0x00000036 #define FILE_DEVICE_DFS_VOLUME 0x00000036
#define FILE_DEVICE_SERENUM 0x00000037
#define FILE_DEVICE_TERMSRV 0x00000038
#define FILE_DEVICE_KSEC 0x00000039
#define METHOD_BUFFERED 0 #define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1 #define METHOD_IN_DIRECT 1
...@@ -345,4 +348,51 @@ typedef struct tagMID { ...@@ -345,4 +348,51 @@ typedef struct tagMID {
/* End VWIN32 information */ /* End VWIN32 information */
/*
* NT I/O-Manager
*/
/*
* structures for NtQueryVolumeInformationFile
* (wdm.h)
*/
/* FileFsVolumeInformation = 1 */
typedef struct _FILE_FS_VOLUME_INFORMATION {
LARGE_INTEGER VolumeCreationTime;
ULONG VolumeSerialNumber;
ULONG VolumeLabelLength;
BOOLEAN SupportsObjects;
WCHAR VolumeLabel[1];
} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
/* FileFsLabelInformation = 2 */
/*
unknown
*/
/* FileFsSizeInformation = 3 */
typedef struct _FILE_FS_SIZE_INFORMATION {
LARGE_INTEGER TotalAllocationUnits;
LARGE_INTEGER AvailableAllocationUnits;
ULONG SectorsPerAllocationUnit;
ULONG BytesPerSector;
} FILE_FS_SIZE_INFORMATION, *PFILE_FS_SIZE_INFORMATION;
/* FileFsDeviceInformation = 4 */
typedef struct _FILE_FS_DEVICE_INFORMATION {
DEVICE_TYPE DeviceType;
ULONG Characteristics;
} FILE_FS_DEVICE_INFORMATION, *PFILE_FS_DEVICE_INFORMATION;
/* FileFsAttributeInformation = 5 */
typedef struct _FILE_FS_ATTRIBUTE_INFORMATION {
ULONG FileSystemAttribute;
LONG MaximumComponentNameLength;
ULONG FileSystemNameLength;
WCHAR FileSystemName[1];
} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment