[ext2fs] initial ext2fs support

This commit is contained in:
Pete Batard 2019-04-12 21:32:40 +01:00
parent f4d70345af
commit cda716c1ff
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
87 changed files with 29093 additions and 130 deletions

View file

@ -228,6 +228,22 @@ out:
return (success)?safe_strdup(physical_name):NULL;
}
/*
* Return an NT path to access the physical drive, or NULL on error.
* The string is allocated and must be freed (to ensure concurrent access)
*/
char* GetNtPhysicalName(DWORD DriveIndex)
{
BOOL success = FALSE;
char physical_name[32];
CheckDriveIndex(DriveIndex);
static_sprintf(physical_name, "\\??\\PHYSICALDRIVE%lu", DriveIndex);
success = TRUE;
out:
return (success) ? safe_strdup(physical_name) : NULL;
}
/*
* Return a handle to the physical drive identified by DriveIndex
*/