From 506f2f2e86b345603cda3d626a2fd64b5ec6223b Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 21 Sep 2025 18:38:22 +0300 Subject: [PATCH] Add logging --- od-win32/hardfile_win32.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/od-win32/hardfile_win32.cpp b/od-win32/hardfile_win32.cpp index 86b4382c..0cde5d71 100644 --- a/od-win32/hardfile_win32.cpp +++ b/od-win32/hardfile_win32.cpp @@ -3233,8 +3233,9 @@ static BOOL GetDevicePropertyFromName(const TCHAR *DevicePath, DWORD Index, DWOR udi->heads = dg.TracksPerCylinder; } - if (gli_ok && gli.Length.QuadPart) + if (gli_ok && gli.Length.QuadPart) { udi->size = gli.Length.QuadPart; + } if (ischs(udi->identity) && gli.Length.QuadPart == 0) { int c, h, s; @@ -3359,14 +3360,16 @@ static BOOL GetDevicePropertyFromName(const TCHAR *DevicePath, DWORD Index, DWOR } } else { - write_log (_T("no MBR partition table detected, checking for RDB\n")); + write_log (_T("no MBR or GPT partition table detected\n")); } } checkrdb: if (udi->offset == 0 && udi->size) { udi->dangerous = safetycheck (hDevice, udi->device_path, 0, buffer, dg.BytesPerSector, udi->identity, udi->chsdetected, NULL); - if (udi->dangerous > 0) + if (udi->dangerous > 0) { + write_log("Drive not added: %d\n", udi->dangerous); goto end; + } } amipartfound: _stprintf (udi2->device_name, _T(":%s"), orgname); -- 2.47.3