mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Fix volume information in OS/2.
This commit is contained in:
@@ -42,6 +42,8 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
|||||||
PFSALLOCATE pfsAllocateBuffer;
|
PFSALLOCATE pfsAllocateBuffer;
|
||||||
char* fsdName;
|
char* fsdName;
|
||||||
PFSINFO pfsInfo;
|
PFSINFO pfsInfo;
|
||||||
|
USHORT usVolSerialHigh;
|
||||||
|
USHORT usVolSerialLow;
|
||||||
|
|
||||||
// 16 bit
|
// 16 bit
|
||||||
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
#if(defined(__I86__) || defined(__i86__) || defined(_M_I86))
|
||||||
@@ -119,14 +121,12 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
|||||||
if(rc) log_write("Error %d requesting volume information.\n", rc);
|
if(rc) log_write("Error %d requesting volume information.\n", rc);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
usVolSerialHigh = *((PUSHORT)&pfsInfo->ftimeCreation);
|
||||||
|
usVolSerialLow = *((PUSHORT)&pfsInfo->fdateCreation);
|
||||||
log_write("\tVolume label: %s\n", pfsInfo->vol.szVolLabel);
|
log_write("\tVolume label: %s\n", pfsInfo->vol.szVolLabel);
|
||||||
log_write("\tVolume created on %d/%02d/%02d %02d:%02d:%02d\n",
|
log_write("\tVolume created on %04X:%04X\n",
|
||||||
pfsInfo->fdateCreation.year + 1980,
|
usVolSerialHigh,
|
||||||
pfsInfo->fdateCreation.month - 1,
|
usVolSerialLow);
|
||||||
pfsInfo->fdateCreation.day,
|
|
||||||
pfsInfo->ftimeCreation.hours,
|
|
||||||
pfsInfo->ftimeCreation.minutes,
|
|
||||||
pfsInfo->ftimeCreation.twosecs * 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pfsInfo);
|
free(pfsInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user