VirtualBox

Changeset 78535 in vbox for trunk/include/iprt


Ignore:
Timestamp:
May 15, 2019 11:48:14 PM (6 years ago)
Author:
vboxsync
Message:

FsPerf,iprt/nt/nt.h: Buffer size testcase for NtQueryVolumeInformationFile. bugref:9172

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/nt/nt.h

    r78488 r78535  
    197197# endif
    198198
     199# define _FSINFOCLASS                   OutdatedWdm_FSINFOCLASS
     200# define FS_INFORMATION_CLASS           OutdatedWdm_FS_INFORMATION_CLASS
     201# define PFS_INFORMATION_CLASS          OutdatedWdm_PFS_INFORMATION_CLASS
     202# define FileFsVolumeInformation        OutdatedWdm_FileFsVolumeInformation
     203# define FileFsLabelInformation         OutdatedWdm_FileFsLabelInformation
     204# define FileFsSizeInformation          OutdatedWdm_FileFsSizeInformation
     205# define FileFsDeviceInformation        OutdatedWdm_FileFsDeviceInformation
     206# define FileFsAttributeInformation     OutdatedWdm_FileFsAttributeInformation
     207# define FileFsControlInformation       OutdatedWdm_FileFsControlInformation
     208# define FileFsFullSizeInformation      OutdatedWdm_FileFsFullSizeInformation
     209# define FileFsObjectIdInformation      OutdatedWdm_FileFsObjectIdInformation
     210# define FileFsDriverPathInformation    OutdatedWdm_FileFsDriverPathInformation
     211# define FileFsVolumeFlagsInformation   OutdatedWdm_FileFsVolumeFlagsInformation
     212# define FileFsSectorSizeInformation    OutdatedWdm_FileFsSectorSizeInformation
     213# define FileFsDataCopyInformation      OutdatedWdm_FileFsDataCopyInformation
     214# define FileFsMetadataSizeInformation  OutdatedWdm_FileFsMetadataSizeInformation
     215# define FileFsFullSizeInformationEx    OutdatedWdm_FileFsFullSizeInformationEx
     216# define FileFsMaximumInformation       OutdatedWdm_FileFsMaximumInformation
     217# define NtQueryVolumeInformationFile   OutdatedWdm_NtQueryVolumeInformationFile
     218# define NtSetVolumeInformationFile     OutdatedWdm_NtSetVolumeInformationFile
     219
    199220# pragma warning(push)
    200221# ifdef RT_ARCH_X86
     
    216237# endif
    217238# pragma warning(pop)
     239
     240# undef _FSINFOCLASS
     241# undef FS_INFORMATION_CLASS
     242# undef PFS_INFORMATION_CLASS
     243# undef FileFsVolumeInformation
     244# undef FileFsLabelInformation
     245# undef FileFsSizeInformation
     246# undef FileFsDeviceInformation
     247# undef FileFsAttributeInformation
     248# undef FileFsControlInformation
     249# undef FileFsFullSizeInformation
     250# undef FileFsObjectIdInformation
     251# undef FileFsDriverPathInformation
     252# undef FileFsVolumeFlagsInformation
     253# undef FileFsSectorSizeInformation
     254# undef FileFsDataCopyInformation
     255# undef FileFsMetadataSizeInformation
     256# undef FileFsFullSizeInformationEx
     257# undef FileFsMaximumInformation
     258# undef NtQueryVolumeInformationFile
     259# undef NtSetVolumeInformationFile
    218260
    219261# define IPRT_NT_NEED_API_GROUP_NTIFS
     
    15531595NTSYSAPI NTSTATUS NTAPI NtUnmapViewOfSection(HANDLE, PVOID);
    15541596
    1555 #ifdef IPRT_NT_USE_WINTERNL
    1556 typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
    1557 {
    1558     ULONG   FileSystemAttributes;
    1559     LONG    MaximumComponentNameLength;
    1560     ULONG   FileSystemNameLength;
    1561     WCHAR   FileSystemName[1];
    1562 } FILE_FS_ATTRIBUTE_INFORMATION;
    1563 typedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION;
    1564 
    1565 #endif
    15661597NTSYSAPI NTSTATUS NTAPI NtOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);
    15671598NTSYSAPI NTSTATUS NTAPI ZwOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);
     
    15811612
    15821613#ifdef IPRT_NT_USE_WINTERNL
     1614typedef struct _FILE_FS_VOLUME_INFORMATION
     1615{
     1616    LARGE_INTEGER   VolumeCreationTime;
     1617    ULONG           VolumeSerialNumber;
     1618    ULONG           VolumeLabelLength;
     1619    BOOLEAN         SupportsObjects;
     1620    WCHAR           VolumeLabel[1];
     1621} FILE_FS_VOLUME_INFORMATION;
     1622typedef FILE_FS_VOLUME_INFORMATION *PFILE_FS_VOLUME_INFORMATION;
     1623typedef struct _FILE_FS_LABEL_INFORMATION
     1624{
     1625    ULONG           VolumeLabelLength;
     1626    WCHAR           VolumeLabel[1];
     1627} FILE_FS_LABEL_INFORMATION;
     1628typedef FILE_FS_LABEL_INFORMATION *PFILE_FS_LABEL_INFORMATION;
    15831629typedef struct _FILE_FS_SIZE_INFORMATION
    15841630{
     
    15891635} FILE_FS_SIZE_INFORMATION;
    15901636typedef FILE_FS_SIZE_INFORMATION *PFILE_FS_SIZE_INFORMATION;
     1637typedef struct _FILE_FS_DEVICE_INFORMATION
     1638{
     1639    DEVICE_TYPE     DeviceType;
     1640    ULONG           Characteristics;
     1641} FILE_FS_DEVICE_INFORMATION;
     1642typedef FILE_FS_DEVICE_INFORMATION *PFILE_FS_DEVICE_INFORMATION;
     1643typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
     1644{
     1645    ULONG           FileSystemAttributes;
     1646    LONG            MaximumComponentNameLength;
     1647    ULONG           FileSystemNameLength;
     1648    WCHAR           FileSystemName[1];
     1649} FILE_FS_ATTRIBUTE_INFORMATION;
     1650typedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION;
     1651typedef struct _FILE_FS_CONTROL_INFORMATION
     1652{
     1653    LARGE_INTEGER   FreeSpaceStartFiltering;
     1654    LARGE_INTEGER   FreeSpaceThreshold;
     1655    LARGE_INTEGER   FreeSpaceStopFiltering;
     1656    LARGE_INTEGER   DefaultQuotaThreshold;
     1657    LARGE_INTEGER   DefaultQuotaLimit;
     1658    ULONG           FileSystemControlFlags;
     1659} FILE_FS_CONTROL_INFORMATION;
     1660typedef FILE_FS_CONTROL_INFORMATION *PFILE_FS_CONTROL_INFORMATION;
     1661typedef struct _FILE_FS_FULL_SIZE_INFORMATION
     1662{
     1663    LARGE_INTEGER   TotalAllocationUnits;
     1664    LARGE_INTEGER   CallerAvailableAllocationUnits;
     1665    LARGE_INTEGER   ActualAvailableAllocationUnits;
     1666    ULONG           SectorsPerAllocationUnit;
     1667    ULONG           BytesPerSector;
     1668} FILE_FS_FULL_SIZE_INFORMATION;
     1669typedef FILE_FS_FULL_SIZE_INFORMATION *PFILE_FS_FULL_SIZE_INFORMATION;
     1670typedef struct _FILE_FS_OBJECTID_INFORMATION
     1671{
     1672    UCHAR           ObjectId[16];
     1673    UCHAR           ExtendedInfo[48];
     1674} FILE_FS_OBJECTID_INFORMATION;
     1675typedef FILE_FS_OBJECTID_INFORMATION *PFILE_FS_OBJECTID_INFORMATION;
     1676typedef struct _FILE_FS_DRIVER_PATH_INFORMATION
     1677{
     1678    BOOLEAN         DriverInPath;
     1679    ULONG           DriverNameLength;
     1680    WCHAR           DriverName[1];
     1681} FILE_FS_DRIVER_PATH_INFORMATION;
     1682typedef FILE_FS_DRIVER_PATH_INFORMATION *PFILE_FS_DRIVER_PATH_INFORMATION;
     1683typedef struct _FILE_FS_VOLUME_FLAGS_INFORMATION
     1684{
     1685    ULONG           Flags;
     1686} FILE_FS_VOLUME_FLAGS_INFORMATION;
     1687typedef FILE_FS_VOLUME_FLAGS_INFORMATION *PFILE_FS_VOLUME_FLAGS_INFORMATION;
     1688#endif
     1689#if !defined(SSINFO_OFFSET_UNKNOWN) || defined(IPRT_NT_USE_WINTERNL)
     1690typedef struct _FILE_FS_SECTOR_SIZE_INFORMATION
     1691{
     1692    ULONG           LogicalBytesPerSector;
     1693    ULONG           PhysicalBytesPerSectorForAtomicity;
     1694    ULONG           PhysicalBytesPerSectorForPerformance;
     1695    ULONG           FileSystemEffectivePhysicalBytesPerSectorForAtomicity;
     1696    ULONG           Flags;
     1697    ULONG           ByteOffsetForSectorAlignment;
     1698    ULONG           ByteOffsetForPartitionAlignment;
     1699} FILE_FS_SECTOR_SIZE_INFORMATION;
     1700typedef FILE_FS_SECTOR_SIZE_INFORMATION *PFILE_FS_SECTOR_SIZE_INFORMATION;
     1701# ifndef SSINFO_OFFSET_UNKNOWN
     1702#  define SSINFO_OFFSET_UNKNOWN                     0xffffffffUL
     1703#  define SSINFO_FLAGS_ALIGNED_DEVICE               1UL
     1704#  define SSINFO_FLAGS_PARTITION_ALIGNED_ON_DEVICE  2UL
     1705#  define SSINFO_FLAGS_NO_SEEK_PENALTY              4UL
     1706#  define SSINFO_FLAGS_TRIM_ENABLED                 8UL
     1707#  define SSINFO_FLAGS_BYTE_ADDRESSABLE             16UL
     1708# endif
     1709#endif
     1710#ifdef IPRT_NT_USE_WINTERNL
     1711typedef struct _FILE_FS_DATA_COPY_INFORMATION
     1712{
     1713    ULONG           NumberOfCopies;
     1714} FILE_FS_DATA_COPY_INFORMATION;
     1715typedef FILE_FS_DATA_COPY_INFORMATION *PFILE_FS_DATA_COPY_INFORMATION;
     1716typedef struct _FILE_FS_METADATA_SIZE_INFORMATION
     1717{
     1718    LARGE_INTEGER   TotalMetadataAllocationUnits;
     1719    ULONG           SectorsPerAllocationUnit;
     1720    ULONG           BytesPerSector;
     1721} FILE_FS_METADATA_SIZE_INFORMATION;
     1722typedef FILE_FS_METADATA_SIZE_INFORMATION *PFILE_FS_METADATA_SIZE_INFORMATION;
     1723typedef struct _FILE_FS_FULL_SIZE_INFORMATION_EX
     1724{
     1725    ULONGLONG       ActualTotalAllocationUnits;
     1726    ULONGLONG       ActualAvailableAllocationUnits;
     1727    ULONGLONG       ActualPoolUnavailableAllocationUnits;
     1728    ULONGLONG       CallerTotalAllocationUnits;
     1729    ULONGLONG       CallerAvailableAllocationUnits;
     1730    ULONGLONG       CallerPoolUnavailableAllocationUnits;
     1731    ULONGLONG       UsedAllocationUnits;
     1732    ULONGLONG       TotalReservedAllocationUnits;
     1733    ULONGLONG       VolumeStorageReserveAllocationUnits;
     1734    ULONGLONG       AvailableCommittedAllocationUnits;
     1735    ULONGLONG       PoolAvailableAllocationUnits;
     1736    ULONG           SectorsPerAllocationUnit;
     1737    ULONG           BytesPerSector;
     1738} FILE_FS_FULL_SIZE_INFORMATION_EX;
     1739typedef FILE_FS_FULL_SIZE_INFORMATION_EX *PFILE_FS_FULL_SIZE_INFORMATION_EX;
     1740#endif /* IPRT_NT_USE_WINTERNL */
    15911741
    15921742typedef enum _FSINFOCLASS
     
    16041754    FileFsSectorSizeInformation,
    16051755    FileFsDataCopyInformation,
     1756    FileFsMetadataSizeInformation,
     1757    FileFsFullSizeInformationEx,
    16061758    FileFsMaximumInformation
    16071759} FS_INFORMATION_CLASS;
    16081760typedef FS_INFORMATION_CLASS *PFS_INFORMATION_CLASS;
    16091761NTSYSAPI NTSTATUS NTAPI NtQueryVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);
    1610 
     1762NTSYSAPI NTSTATUS NTAPI NtSetVolumeInformationFile(HANDLE, PIO_STATUS_BLOCK, PVOID, ULONG, FS_INFORMATION_CLASS);
     1763
     1764#ifdef IPRT_NT_USE_WINTERNL
    16111765typedef struct _FILE_DIRECTORY_INFORMATION
    16121766{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette