From c6cfbaf246c611f3392d81f2ea6979d27209ea56 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Fri, 9 Jan 2009 17:10:51 +0000 Subject: [PATCH] kes Add more debug output to VSS init. kes Attempt to correct win32 debug in berrno. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8346 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/berrno.c | 26 ++++++++++++-------------- bacula/src/lib/berrno.h | 5 +---- bacula/technotes-2.5 | 3 +++ 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/bacula/src/lib/berrno.c b/bacula/src/lib/berrno.c index c7d1499235..b7669efd65 100644 --- a/bacula/src/lib/berrno.c +++ b/bacula/src/lib/berrno.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2007 Free Software Foundation Europe e.V. + Copyright (C) 2004-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -51,6 +51,7 @@ const char *berrno::bstrerror() { #ifdef HAVE_WIN32 if (m_berrno & b_errno_win32) { + format_win32_message(); return (const char *)m_buf; } #else @@ -92,19 +93,16 @@ void berrno::format_win32_message() { #ifdef HAVE_WIN32 LPVOID msg; - if (m_berrno & b_errno_win32) { - FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)&msg, - 0, - NULL); - - pm_strcpy(&m_buf, (const char *)msg); - LocalFree(msg); - } + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)&msg, + 0, + NULL); + pm_strcpy(&m_buf, (const char *)msg); + LocalFree(msg); #endif } diff --git a/bacula/src/lib/berrno.h b/bacula/src/lib/berrno.h index 200347caa4..ee392ea549 100644 --- a/bacula/src/lib/berrno.h +++ b/bacula/src/lib/berrno.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2004-2007 Free Software Foundation Europe e.V. + Copyright (C) 2004-2009 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -75,9 +75,6 @@ inline berrno::berrno(int pool) { m_berrno = errno; m_buf = get_pool_memory(pool); -#ifdef HAVE_WIN32 - format_win32_message(); -#endif errno = m_berrno; } diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 23fe5d0d0d..649a93bcc8 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -11,6 +11,9 @@ mixed priorities General: 09Jan09 +kes Add more debug output to VSS init. +kes Attempt to correct win32 debug in berrno. +09Jan09 kes Fix bug reported by Dan where make fails in clean of src/win32. 07Jan09 kes Fix bug #1212, SD is unable to recycle purged volumes. fstat() -- 2.39.5