mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-08 10:22:30 -04:00
[ext2fs] initial ext2fs support
This commit is contained in:
parent
f4d70345af
commit
cda716c1ff
87 changed files with 29093 additions and 130 deletions
16
src/drive.c
16
src/drive.c
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue