mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 14:05:22 -04:00
[core] improve VDS calls
* Factorize error setting. * Use break so as to not leak resources on error. * Ensure that the error codes are set properly.
This commit is contained in:
parent
e8c717c394
commit
2538974318
3 changed files with 35 additions and 65 deletions
|
@ -54,7 +54,7 @@
|
|||
|
||||
#define FILE_FLOPPY_DISKETTE 0x00000004
|
||||
|
||||
#define VDS_SET_ERROR(hr) do { if (hr == S_FALSE) hr = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_GEN_FAILURE; FormatStatus = hr; SetLastError(hr); } while(0)
|
||||
#define VDS_SET_ERROR(hr) do { if (hr != S_OK) { hr = ERROR_SEVERITY_ERROR|FAC(FACILITY_STORAGE)|ERROR_GEN_FAILURE; FormatStatus = hr; SetLastError(hr); } } while(0)
|
||||
|
||||
#if !defined(__MINGW32__)
|
||||
typedef enum _FSINFOCLASS {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue