mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Detect Microsoft C in 16-bit OS/2 and use different PFSINFO structure format to retrieve volume serial number.
This commit is contained in:
@@ -121,8 +121,13 @@ void GetVolumeInfo(const char* path, size_t* clusterSize)
|
||||
if(rc) log_write("Error %d requesting volume information.\n", rc);
|
||||
else
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
usVolSerialHigh = (USHORT)(pfsInfo->ulVSN >> 16);
|
||||
usVolSerialLow = (USHORT)(pfsInfo->ulVSN & 0xFFFF);
|
||||
#else
|
||||
usVolSerialHigh = *((PUSHORT)&pfsInfo->ftimeCreation);
|
||||
usVolSerialLow = *((PUSHORT)&pfsInfo->fdateCreation);
|
||||
#endif
|
||||
log_write("\tVolume label: %s\n", pfsInfo->vol.szVolLabel);
|
||||
log_write("\tVolume created on %04X:%04X\n", usVolSerialHigh, usVolSerialLow);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user