VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/ExpandVolume
diff options
context:
space:
mode:
Diffstat (limited to 'src/ExpandVolume')
-rw-r--r--src/ExpandVolume/DlgExpandVolume.cpp6
-rw-r--r--src/ExpandVolume/ExpandVolume.c6
-rw-r--r--src/ExpandVolume/InitDataArea.c8
-rw-r--r--src/ExpandVolume/WinMain.cpp4
4 files changed, 16 insertions, 8 deletions
diff --git a/src/ExpandVolume/DlgExpandVolume.cpp b/src/ExpandVolume/DlgExpandVolume.cpp
index 554f4f6f..15888f50 100644
--- a/src/ExpandVolume/DlgExpandVolume.cpp
+++ b/src/ExpandVolume/DlgExpandVolume.cpp
@@ -384,9 +384,9 @@ BOOL CALLBACK ExpandVolProgressDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, L
bVolTransformStarted = TRUE;
pProgressDlgParam->hwndDlg = hwndDlg;
if ( _beginthread (volTransformThreadFunction, 0, pProgressDlgParam) == -1L )
{
- handleError (hwndDlg, ERR_OS_ERROR);
+ handleError (hwndDlg, ERR_OS_ERROR, SRC_POS);
EndDialog (hwndDlg, lw);
}
WaitCursor();
}
@@ -571,9 +571,9 @@ void ExpandVolumeWizard (HWND hwndDlg, char *lpszVolume)
}
NormalCursor();
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
}
WaitCursor();
@@ -721,9 +721,9 @@ ret:
error:
if (nStatus != 0)
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
burn (&VolumePassword, sizeof (VolumePassword));
RestoreDefaultKeyFilesParam();
diff --git a/src/ExpandVolume/ExpandVolume.c b/src/ExpandVolume/ExpandVolume.c
index 5b9509be..9233340c 100644
--- a/src/ExpandVolume/ExpandVolume.c
+++ b/src/ExpandVolume/ExpandVolume.c
@@ -55,8 +55,12 @@ Original legal notice of the TrueCrypt source files:
#include "InitDataArea.h"
#include "ExpandVolume.h"
#include "Resource.h"
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
#define DEBUG_EXPAND_VOLUME
#ifdef DEBUG_EXPAND_VOLUME
#define DebugAddProgressDlgStatus AddProgressDlgStatus
@@ -986,9 +990,9 @@ void __cdecl volTransformThreadFunction (void *pExpandDlgParam)
nStatus = ExpandVolume (hwndDlg, (char*)pParam->szVolumeName, pParam->pVolumePassword,
pParam->VolumePkcs5, pParam->VolumePin, pParam->newSize, pParam->bInitFreeSpace );
if (nStatus!=ERR_SUCCESS && nStatus!=ERR_USER_ABORT)
- handleError (hwndDlg, nStatus);
+ handleError (hwndDlg, nStatus, SRC_POS);
bVolTransformThreadCancel = FALSE;
PostMessage (hwndDlg, TC_APPMSG_VOL_TRANSFORM_THREAD_ENDED, 0, nStatus);
diff --git a/src/ExpandVolume/InitDataArea.c b/src/ExpandVolume/InitDataArea.c
index a3793e86..c1eb6bd2 100644
--- a/src/ExpandVolume/InitDataArea.c
+++ b/src/ExpandVolume/InitDataArea.c
@@ -58,8 +58,12 @@ Original legal notice of the TrueCrypt source:
#include "Resource.h"
#include "InitDataArea.h"
+#ifndef SRC_POS
+#define SRC_POS (__FUNCTION__ ":" TC_TO_STRING(__LINE__))
+#endif
+
int FormatWriteBufferSize = 1024 * 1024;
static uint32 FormatSectorSize = 0;
void SetFormatSectorSize(uint32 sector_size)
@@ -225,9 +229,9 @@ static void __cdecl FormatWriteThreadProc (void *arg)
while (!WriteThreadExitRequested)
{
if (WaitForSingleObject (WriteBufferFullEvent, INFINITE) == WAIT_FAILED)
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
break;
}
if (WriteThreadExitRequested)
@@ -239,9 +243,9 @@ static void __cdecl FormatWriteThreadProc (void *arg)
WriteRequestResult = ERROR_SUCCESS;
if (!SetEvent (WriteBufferEmptyEvent))
{
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
break;
}
}
diff --git a/src/ExpandVolume/WinMain.cpp b/src/ExpandVolume/WinMain.cpp
index 81d782c1..020a6b22 100644
--- a/src/ExpandVolume/WinMain.cpp
+++ b/src/ExpandVolume/WinMain.cpp
@@ -982,11 +982,11 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszComm
status = DriverAttach ();
if (status != 0)
{
if (status == ERR_OS_ERROR)
- handleWin32Error (NULL);
+ handleWin32Error (NULL, SRC_POS);
else
- handleError (NULL, status);
+ handleError (NULL, status, SRC_POS);
AbortProcess ("NODRIVER");
}