Added XFileSystemSizeInfo.

This commit is contained in:
gibbed 2015-05-22 00:52:18 -05:00
parent 5ac98d2feb
commit 3077999240
1 changed files with 19 additions and 0 deletions

View File

@ -103,6 +103,25 @@ class XVolumeInfo {
};
static_assert_size(XVolumeInfo, 24);
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff540282(v=vs.85).aspx
class XFileSystemSizeInfo {
public:
// FILE_FS_SIZE_INFORMATION
uint64_t total_allocation_units;
uint64_t available_allocation_units;
uint32_t sectors_per_allocation_unit;
uint32_t bytes_per_sector;
void Write(uint8_t* base, uint32_t p) {
uint8_t* dst = base + p;
xe::store_and_swap<uint64_t>(dst + 0, this->total_allocation_units);
xe::store_and_swap<uint64_t>(dst + 8, this->available_allocation_units);
xe::store_and_swap<uint32_t>(dst + 16, this->sectors_per_allocation_unit);
xe::store_and_swap<uint32_t>(dst + 20, this->bytes_per_sector);
}
};
static_assert_size(XFileSystemSizeInfo, 24);
// http://msdn.microsoft.com/en-us/library/windows/hardware/ff540251(v=vs.85).aspx
class XFileSystemAttributeInfo {
public: