[ext2fs] integrate ext3 formatting into UI operations

* Add display of persistence controls on relevant images
* Add progress on ext3 formatting and improve error reporting
* Also improve MountVolume() and fix some Coverity warnings
This commit is contained in:
Pete Batard 2019-04-16 20:44:13 +01:00
parent ccf0f1bf3c
commit 0ad3f8c1d3
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
16 changed files with 298 additions and 113 deletions

View file

@ -42,7 +42,6 @@ HWND hStatus;
size_t ubuffer_pos = 0;
char ubuffer[UBUFFER_SIZE]; // Buffer for ubpushf() messages we don't log right away
#ifdef RUFUS_LOGGING
void _uprintf(const char *format, ...)
{
static char buf[4096];
@ -78,7 +77,19 @@ void _uprintf(const char *format, ...)
}
free(wbuf);
}
#endif
void _uprintfs(const char* str)
{
wchar_t* wstr;
wstr = utf8_to_wchar(str);
OutputDebugStringW(wstr);
if ((hLog != NULL) && (hLog != INVALID_HANDLE_VALUE)) {
Edit_SetSel(hLog, MAX_LOG_SIZE, MAX_LOG_SIZE);
Edit_ReplaceSel(hLog, wstr);
Edit_Scroll(hLog, Edit_GetLineCount(hLog), 0);
}
free(wstr);
}
// Prints a bitstring of a number of any size, with or without leading zeroes.
// See also the printbits() and printbitslz() helper macros in rufus.h