mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 06:25:29 -04:00
[core] partitioning improvements
* Improve report and make sure we zero leftovers from the start of a partition * Also add VDS error codes * Also fix Coverity warnings
This commit is contained in:
parent
1c39a80d72
commit
5f9e65707f
7 changed files with 521 additions and 58 deletions
11
src/drive.h
11
src/drive.h
|
@ -318,6 +318,17 @@ interface IVdsAsync {
|
|||
#define IVdsAsync_Release(This) (This)->lpVtbl->Release(This)
|
||||
#endif
|
||||
|
||||
/* MinGW is unhappy about accessing partitions beside the first unless we redef */
|
||||
typedef struct _DRIVE_LAYOUT_INFORMATION_EX4 {
|
||||
DWORD PartitionStyle;
|
||||
DWORD PartitionCount;
|
||||
union {
|
||||
DRIVE_LAYOUT_INFORMATION_MBR Mbr;
|
||||
DRIVE_LAYOUT_INFORMATION_GPT Gpt;
|
||||
} Type;
|
||||
PARTITION_INFORMATION_EX PartitionEntry[MAX_PARTITIONS];
|
||||
} DRIVE_LAYOUT_INFORMATION_EX4, *PDRIVE_LAYOUT_INFORMATION_EX4;
|
||||
|
||||
static __inline BOOL UnlockDrive(HANDLE hDrive) {
|
||||
DWORD size;
|
||||
return DeviceIoControl(hDrive, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, &size, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue