From: Kern Sibbald Date: Mon, 13 Feb 2012 13:56:13 +0000 (+0100) Subject: Tweak VSS X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f7063e71a5075c26732a1344c22b4c26e29d9ad2;p=bacula%2Fbacula Tweak VSS --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index d405062505..6636cc11d0 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1902,6 +1902,7 @@ static int backup_cmd(JCR *jcr) /* tell vss which drives to snapshot */ char szWinDriveLetters[27]; *szWinDriveLetters=0; + /* Plugin driver can return drive letters */ generate_plugin_event(jcr, bEventVssPrepareSnapshot, szWinDriveLetters); if (get_win32_driveletters(jcr->ff, szWinDriveLetters)) { Jmsg(jcr, M_INFO, 0, _("Generate VSS snapshots. Driver=\"%s\", Drive(s)=\"%s\"\n"), g_pVSSClient->GetDriverName(), szWinDriveLetters); diff --git a/bacula/src/findlib/find.c b/bacula/src/findlib/find.c index cf707265f6..df615480fd 100644 --- a/bacula/src/findlib/find.c +++ b/bacula/src/findlib/find.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2010 Free Software Foundation Europe e.V. + Copyright (C) 2000-2012 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. @@ -122,8 +122,9 @@ get_win32_driveletters(FF_PKT *ff, char* szDrives) return 0; #endif int nCount; - /* Can be already filled by plugin, so check that everything - * is on upper case. TODO: can check for dupplicate? + /* + * Can be already filled by plugin, so check that all + * letters are in upper case. There should be no duplicates. */ for (nCount = 0; nCount < 27 && szDrives[nCount] ; nCount++) { szDrives[nCount] = toupper(szDrives[nCount]); diff --git a/bacula/src/win32/filed/vss.h b/bacula/src/win32/filed/vss.h index 594258ac01..4268bf1a7c 100644 --- a/bacula/src/win32/filed/vss.h +++ b/bacula/src/win32/filed/vss.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2006-2010 Free Software Foundation Europe e.V. + Copyright (C) 2006-2012 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. @@ -116,7 +116,11 @@ public: virtual bool CloseBackup(); virtual bool CloseRestore(); virtual WCHAR *GetMetadata(); - virtual const char* GetDriverName() { return "VSS WinXP"; }; +#ifdef _WIN64 + virtual const char* GetDriverName() { return "Win64 VSS"; }; +#else + virtual const char* GetDriverName() { return "Win32 VSS"; }; +#endif private: virtual bool Initialize(DWORD dwContext, bool bDuringRestore, bool (*VssInitCallback)(JCR *, int) = NULL); virtual bool WaitAndCheckForAsyncOperation(IVssAsync* pAsync); @@ -133,7 +137,11 @@ public: virtual bool CloseBackup(); virtual bool CloseRestore(); virtual WCHAR *GetMetadata(); - virtual const char* GetDriverName() { return "VSS Win 2003"; }; +#ifdef _WIN64 + virtual const char* GetDriverName() { return "Win64 VSS"; }; +#else + virtual const char* GetDriverName() { return "Win32 VSS"; }; +#endif private: virtual bool Initialize(DWORD dwContext, bool bDuringRestore, bool (*VssInitCallback)(JCR *, int) = NULL); virtual bool WaitAndCheckForAsyncOperation(IVssAsync* pAsync); @@ -150,7 +158,11 @@ public: virtual bool CloseBackup(); virtual bool CloseRestore(); virtual WCHAR *GetMetadata(); - virtual const char* GetDriverName() { return "VSS Vista"; }; +#ifdef _WIN64 + virtual const char* GetDriverName() { return "Win64 VSS"; }; +#else + virtual const char* GetDriverName() { return "Win32 VSS"; }; +#endif private: virtual bool Initialize(DWORD dwContext, bool bDuringRestore, bool (*VssInitCallback)(JCR *, int) = NULL); virtual bool WaitAndCheckForAsyncOperation(IVssAsync* pAsync);