ln -s $(DESTDIR)/usr/bin/consolehelper $(DESTDIR)/usr/bin/gnome-console
install: installdirs
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
uninstall:
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
install-autostart:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-dir:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-fd:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
install-autostart-sd:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-autostart:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-autostart-dir:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-autostart-fd:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-autostart-sd:
- (cd platforms; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
+ (cd platforms && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1)
uninstall-menu:
rm -f $(DESTDIR)/usr/share/pixmaps/bacula.png
# clean for distribution
distclean:
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
- @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
- @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
- @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
+ @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
+ @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
+ @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) bconsole gconsole
@$(RMF) -rf txt diff src/python src/testprogs
devclean:
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) $@ || exit 1); done
- @for I in $(all_subdirs); do (cd $$I; $(RMF) startit stopit btraceback); done
- @(cd $(srcdir); $(RMF) *~ config.cache config.h config.log config.status config.out)
- @(cd $(srcdir); $(RMF) Makefile autoconf/Make.common)
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
+ @for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
+ @(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
+ @(cd $(srcdir) && $(RMF) Makefile autoconf/Make.common)
@(cd platforms; echo "==>Entering directory `pwd`"; ${MAKE} $@ || exit 1)
@$(RMF) bacula fd Makefile startmysql stopmysql startit stopit btraceback
@$(RMF) bconsole gconsole
distdirs:
mkdir ../$(VERNAME);
mkdir ../$(VERNAME)/autoconf;
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || (echo "Failed to make distclean in $$I"; exit 0) ); done
distcopy:
$(CP) -p $(DIST) ../$(VERNAME);
$(CP) -p $(DIST_CFG) ../$(VERNAME)/autoconf;
- @for I in $(all_subdirs); do (cd $$I; $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
+ @for I in $(all_subdirs); do (cd $$I && $(MAKE) DESTDIR=$(DESTDIR) $@ || exit 1); done
distrib: configure autoconf/config.h.in distdirs distcopy
Changes to 1.37.31:
22Jul05
+- Correct compiler complaints in wx-console and tray-monitor.
+- Correct VSS problems recognizing c:
+- Add VSS before job status
+- Fix output of status from being one big line.
+- Change cd xx; make to cd xx && make as suggested by Phil.
+- Cleanup projects file
+- Remove unnecessary casting of FF_PKT in filed.
- Apply Thorsten's bugfix for vss_generic.cpp
- Add check for df path for dvd_freespace
- Use df to get space used on DVD.
Projects:
Bacula Projects Roadmap
- 23 April 2005
+ 22 July 2005
The following major projects are scheduled for 1.37:
-#3 Migration (Move, Copy, Archive Jobs)
-#4 Embedded Python Scripting (implemented in all Daemons)
-#5 Events that call a Python program (Implemented in all
- daemons, but more cleanup work to be done).
-#6 Select one from among Multiple Storage Devices for Job.
- This is already implemented in 1.37.
-#7 Single Job Writing to Multiple Storage Devices. This is
- currently implemented with a Clone feature.
-#- Full multiple drive Autochanger support (mostly implemented).
-#- We will have built in support for communications
- encryption (TLS) done by Landon Fuller.
-# We will most likely have support for Unicode characters
- (via UTF-8) on Win32 machines thanks to Thorsten Engle.
Below, you will find more information on those projects as
Highwater size (keep total size)
Lowwater mark
-
-Item 4: Embedded Python Scripting (precursor to 5).
- Status: Implemented in 1.37 in all 3 daemons.
-
- What: On a configuration parameter, embed the Python language in
- Bacula.
-
- Why: The embedded Python scripting can be called to implement
- Events such as "Volume Name needed", "End of Tape",
- "Tape at x% of rated capacity", "Job started",
- "Job Ended", "Job error", ...
-
- Notes: This needs Events.
-
-
-Item 5: Implement Events that call the scripting language.
- Status: Implemented in 1.37, but more events to complete and
- more work to be done to cleanup the implementation.
-
- What: When a particular user defined Event occurs, call the
- embedded Python interpreter.
-
- Why: This will provide the ultimate in user customization for
- Bacula. Almost anything imaginable can be done if Events
- are called at the appropriate place.
-
- Notes: There is a certain amount of work to be done on how
- the user defines or "registers" events.
-
-
-Item 6: Multiple Storage Devices for a Single Job
- Status: This is already implemented in 1.37 (at least the
- initial selection of one from a number of storage
- devices.
-
- What: Allow any Job to specify a number of storage devices,
- from which one will be used.
-
- Why: With two devices, for example, the second device could
- have the next backup tape pre-mounted reducing operator
- intervention in the middle of the night.
-
-
-Item 7: Backup a Single Job Simultaneously to Multiple Storage Devices
- Status: This will probably not be done in 1.37. However, version
- 1.37 has a job Cloning feature, which permits essentially
- the same thing.
-
- What: Make two copies of the backup data at the same time.
-
- Why: Large shops typically do this and then take one set of
- backups off-site. Some design work it needed in how to
- specify the type of backup (backup, archive, ...) for
- each Device.
-
-
-
-Item 8: Break the one-to-one Relationship between a Job and a
- Specific Storage Device (or Devices if #10 is implemented).
- Status: Mostly done in 1.37.
-
- What: Allow a Job to simply specify one or more MediaType, and
- the Storage daemon will select a device for it. In
- fact, the user should be able to specify one or more
- MediaType, Storage daemon, and/or device to be used.
-
- Why: To allow more flexibility in large shops that have multiple
- drives and/or multiple drives of different types.
-
-
Item 9: Implement data encryption (as opposed to communications
encryption)
- Status: Abel Menos expressed interest in this, but he is busy
- at work.
-
+ Status: Landon Fuller has agreed to work on this.
+
What: Currently the data that is stored on the Volume is not
encrypted. For confidentiality, encryption of data at
- the File daemon level is essential. Note, communications
- encryption encrypts the data when leaving the File daemon,
- then decrypts the data on entry to the Storage daemon.
+ the File daemon level is essential.
Data encryption encrypts the data in the File daemon and
decrypts the data in the File daemon during a restore.
Why: Large sites require this.
- Notes: The only algorithm that is needed is AES.
- http://csrc.nist.gov/CryptoToolkit/aes/
-
+Items completed for release 1.38.0:
+#4 Embedded Python Scripting (implemented in all Daemons)
+#5 Events that call a Python program (Implemented in all
+ daemons, but more cleanup work to be done).
+#6 Select one from among Multiple Storage Devices for Job.
+ This is already implemented in 1.37.
+#7 Single Job Writing to Multiple Storage Devices. This is
+ currently implemented with a Clone feature.
+#- Full multiple drive Autochanger support (mostly implemented).
+#- We will have built in support for communications
+ encryption (TLS) done by Landon Fuller.
+# We will most likely have support for Unicode characters
+ (via UTF-8) on Win32 machines thanks to Thorsten Engle.
+Item 8: Break the one-to-one Relationship between a Job and a
+ Specific Storage Device (or Devices if #10 is implemented).
Completed items from last year's list:
Item 1: Multiple simultaneous Jobs. (done)
@$(RMF) AUTHORS ChangeLog Makefile.am NEWS README acconfig.h autogen.sh
@$(RMF) configure.in stamp.h stamp-h.in
@$(RMF) -r po
- (cd gnome2-console; $(MAKE) clean)
+ (cd gnome2-console && $(MAKE) clean)
realclean: clean
@$(RMF) tags
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
- @(cd $(srcdir); $(RMF) Makefile)
+ @(cd $(srcdir) && $(RMF) Makefile)
@$(RMF) config.h host.h
@$(RMF) -r CVS
devclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
- @(cd $(srcdir); $(RMF) Makefile)
+ @(cd $(srcdir) && $(RMF) Makefile)
@$(RMF) config.h host.h
install:
bnet_sig(dir, BNET_TERMINATE);
/* Clean up fileset */
- FF_PKT *ff = (FF_PKT *)jcr->ff;
+ FF_PKT *ff = jcr->ff;
findFILESET *fileset = ff->fileset;
if (fileset) {
int i, j, k;
}
ff->fileset = NULL;
Dmsg0(100, "Calling term_find_files\n");
- term_find_files((FF_PKT *)jcr->ff);
+ term_find_files(jcr->ff);
jcr->ff = NULL;
Dmsg0(100, "Done with term_find_files\n");
free_jcr(jcr); /* destroy JCR record */
if (!jcr->ff) {
return false;
}
- ff = (FF_PKT *)jcr->ff;
+ ff = jcr->ff;
if (ff->fileset) {
return false;
}
static void add_fileset(JCR *jcr, const char *item)
{
- FF_PKT *ff = (FF_PKT *)jcr->ff;
+ FF_PKT *ff = jcr->ff;
findFILESET *fileset = ff->fileset;
int state = fileset->state;
findFOPTS *current_opts;
static bool term_fileset(JCR *jcr)
{
- FF_PKT *ff = (FF_PKT *)jcr->ff;
+ FF_PKT *ff = jcr->ff;
findFILESET *fileset = ff->fileset;
int i, j, k;
set_jcr_job_status(jcr, JS_Blocked);
jcr->JobType = JT_BACKUP;
- Dmsg1(100, "begin backup ff=%p\n", (FF_PKT *)jcr->ff);
+ Dmsg1(100, "begin backup ff=%p\n", jcr->ff);
if (sd == NULL) {
Jmsg(jcr, M_FATAL, 0, _("Cannot contact Storage daemon\n"));
#ifdef WIN32_VSS
/* START VSS ON WIN 32 */
- if (g_pVSSClient && enable_vss == 1) {
+ if (g_pVSSClient && enable_vss) {
if (g_pVSSClient->InitializeForBackup()) {
/* tell vss which drives to snapshot */
char szWinDriveLetters[27];
- if (get_win32_driveletters((FF_PKT *)jcr->ff, 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);
-
if (!g_pVSSClient->CreateSnapshots(szWinDriveLetters)) {
Jmsg(jcr, M_WARNING, 0, _("Generate VSS snapshots failed\n"));
- }
- else {
+ } else {
/* tell user if snapshot creation of a specific drive failed */
size_t i;
for (i=0; i<strlen (szWinDriveLetters); i++) {
int msg_type = M_INFO;
if (g_pVSSClient->GetWriterState(i) < 0)
msg_type = M_WARNING;
-
Jmsg(jcr, msg_type, 0, _("VSS Writer: %s\n"), g_pVSSClient->GetWriterInfo(i));
}
}
+ } else {
+ Jmsg(jcr, M_INFO, 0, _("No drive letters found for generating VSS snapshots.\n"));
}
} else {
Jmsg(jcr, M_WARNING, 0, _("VSS was not initialized properly. VSS support is disabled.\n"));
static int privs = 0;
#endif
#ifdef WIN32_VSS
+#include "vss.h"
#define VSS " VSS"
+extern VSSClient *g_pVSSClient;
#else
#define VSS ""
#endif
if (!privs) {
privs = enable_backup_privileges(NULL, 1);
}
- len = Mmsg(msg,
- _(" Priv 0x%x\n APIs=%sOPT,%sATP,%sLPV,%sCFA,%sCFW,\n"
- " %sWUL,%sWMKD,%sWOP,%sGFAA,%sGFAW,%sGFAEA,%sGFAEW,%sSFAA,%sSFAW,%sBR,%sBW,%sSPSP,\n"
- " %sWC2MB,%sMB2WC,%sFFFA,%sFFFW,%sFNFA,%sFNFW,%sSCDA,%sSCDW,\n"
- " %sGCDA,%sGCDW\n"),
- privs,
- p_OpenProcessToken?"":"!",
- p_AdjustTokenPrivileges?"":"!",
- p_LookupPrivilegeValue?"":"!",
-
- p_CreateFileA?"":"!",
- p_CreateFileW?"":"!",
-
- p_wunlink?"":"!",
- p_wmkdir?"":"!",
- p_wopen?"":"!",
-
- p_GetFileAttributesA?"":"!",
- p_GetFileAttributesW?"":"!",
-
- p_GetFileAttributesExA?"":"!",
- p_GetFileAttributesExW?"":"!",
-
- p_SetFileAttributesA?"":"!",
- p_SetFileAttributesW?"":"!",
- p_BackupRead?"":"!",
- p_BackupWrite?"":"!",
- p_SetProcessShutdownParameters?"":"!",
-
- p_WideCharToMultiByte?"":"!",
- p_MultiByteToWideChar?"":"!",
-
- p_FindFirstFileA?"":"!",
- p_FindFirstFileW?"":"!",
-
- p_FindNextFileA?"":"!",
- p_FindNextFileW?"":"!",
-
- p_SetCurrentDirectoryA?"":"!",
- p_SetCurrentDirectoryW?"":"!",
-
- p_GetCurrentDirectoryA?"":"!",
- p_GetCurrentDirectoryW?"":"!");
+ len = Mmsg(msg, "Priv 0x%x\n", privs);
+ sendit(msg, len, arg);
+ len = Mmsg(msg, "APIs=%sOPT,%sATP,%sLPV,%sCFA,%sCFW,\n",
+ p_OpenProcessToken?"":"!",
+ p_AdjustTokenPrivileges?"":"!",
+ p_LookupPrivilegeValue?"":"!",
+ p_CreateFileA?"":"!",
+ p_CreateFileW?"":"!");
+ sendit(msg, len, arg);
+ len = Mmsg(msg, " %sWUL,%sWMKD,%sWOP,%sGFAA,%sGFAW,%sGFAEA,%sGFAEW,%sSFAA,%sSFAW,%sBR,%sBW,%sSPSP,\n",
+ p_wunlink?"":"!",
+ p_wmkdir?"":"!",
+ p_wopen?"":"!",
+ p_GetFileAttributesA?"":"!",
+ p_GetFileAttributesW?"":"!",
+ p_GetFileAttributesExA?"":"!",
+ p_GetFileAttributesExW?"":"!",
+ p_SetFileAttributesA?"":"!",
+ p_SetFileAttributesW?"":"!",
+ p_BackupRead?"":"!",
+ p_BackupWrite?"":"!",
+ p_SetProcessShutdownParameters?"":"!");
sendit(msg, len, arg);
+ len = Mmsg(msg, " %sWC2MB,%sMB2WC,%sFFFA,%sFFFW,%sFNFA,%sFNFW,%sSCDA,%sSCDW,\n",
+ p_WideCharToMultiByte?"":"!",
+ p_MultiByteToWideChar?"":"!",
+ p_FindFirstFileA?"":"!",
+ p_FindFirstFileW?"":"!",
+ p_FindNextFileA?"":"!",
+ p_FindNextFileW?"":"!",
+ p_SetCurrentDirectoryA?"":"!",
+ p_SetCurrentDirectoryW?"":"!");
+ sendit(msg, len, arg);
+ len = Mmsg(msg, " %sGCDA,%sGCDW\n",
+ p_GetCurrentDirectoryA?"":"!",
+ p_GetCurrentDirectoryW?"":"!");
+ sendit(msg, len, arg);
}
#endif
if (debug_level > 0) {
Dmsg0(1000, "Begin status jcr loop.\n");
len = Mmsg(msg, _("Running Jobs:\n"));
sendit(msg, len, arg);
+ char *vss = "";
+#ifdef WIN32_VSS
+ if (g_pVSSClient && g_pVSSClient->IsInitialized()) {
+ vss = "VSS ";
+ }
+#endif
foreach_jcr(njcr) {
bstrftime_nc(dt, sizeof(dt), njcr->start_time);
if (njcr->JobId == 0) {
len = Mmsg(msg, _("JobId %d Job %s is running.\n"),
njcr->JobId, njcr->Job);
sendit(msg, len, arg);
- len = Mmsg(msg, _(" %s Job started: %s\n"),
- job_type_to_str(njcr->JobType), dt);
+ len = Mmsg(msg, _(" %s%s Job started: %s\n"),
+ vss, job_type_to_str(njcr->JobType), dt);
}
sendit(msg, len, arg);
if (njcr->JobId == 0) {
for (j=0; j<incexe->name_list.size(); j++) {
char *fname = (char *)incexe->name_list.get(j);
/* fname should match x:/ */
- if (strlen (fname) > 3 && B_ISALPHA(fname[0])
- && fname[1] == ':' && fname[2] == '/') {
+ if (strlen(fname) >= 2 && B_ISALPHA(fname[0])
+ && fname[1] == ':') {
/* always add in uppercase */
char ch = toupper(fname[0]);
* Kern Sibbald MMIII
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2003-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
DWORD g_platform_id = VER_PLATFORM_WIN32_WINDOWS;
#ifdef WIN32_VSS
/* preset VSSClient to NULL */
-VSSClient* g_pVSSClient = NULL;
+VSSClient *g_pVSSClient = NULL;
#endif
/* API Pointers */
-t_OpenProcessToken p_OpenProcessToken = NULL;
+t_OpenProcessToken p_OpenProcessToken = NULL;
t_AdjustTokenPrivileges p_AdjustTokenPrivileges = NULL;
-t_LookupPrivilegeValue p_LookupPrivilegeValue = NULL;
+t_LookupPrivilegeValue p_LookupPrivilegeValue = NULL;
t_SetProcessShutdownParameters p_SetProcessShutdownParameters = NULL;
-t_CreateFileA p_CreateFileA = NULL;
-t_CreateFileW p_CreateFileW = NULL;
+t_CreateFileA p_CreateFileA = NULL;
+t_CreateFileW p_CreateFileW = NULL;
t_wunlink p_wunlink = NULL;
t_wmkdir p_wmkdir = NULL;
t_wopen p_wopen = NULL;
-t_GetFileAttributesA p_GetFileAttributesA = NULL;
-t_GetFileAttributesW p_GetFileAttributesW = NULL;
+t_GetFileAttributesA p_GetFileAttributesA = NULL;
+t_GetFileAttributesW p_GetFileAttributesW = NULL;
-t_GetFileAttributesExA p_GetFileAttributesExA = NULL;
-t_GetFileAttributesExW p_GetFileAttributesExW = NULL;
+t_GetFileAttributesExA p_GetFileAttributesExA = NULL;
+t_GetFileAttributesExW p_GetFileAttributesExW = NULL;
-t_SetFileAttributesA p_SetFileAttributesA = NULL;
-t_SetFileAttributesW p_SetFileAttributesW = NULL;
-t_BackupRead p_BackupRead = NULL;
-t_BackupWrite p_BackupWrite = NULL;
+t_SetFileAttributesA p_SetFileAttributesA = NULL;
+t_SetFileAttributesW p_SetFileAttributesW = NULL;
+t_BackupRead p_BackupRead = NULL;
+t_BackupWrite p_BackupWrite = NULL;
t_WideCharToMultiByte p_WideCharToMultiByte = NULL;
t_MultiByteToWideChar p_MultiByteToWideChar = NULL;
/* wopen */
p_wopen = (t_wopen)
GetProcAddress(hLib, "_wopen");
-
+
FreeLibrary(hLib);
}
p_BackupRead = NULL;
p_BackupWrite = NULL;
- p_CreateFileW = NULL;
- p_GetFileAttributesW = NULL;
+ p_CreateFileW = NULL;
+ p_GetFileAttributesW = NULL;
p_GetFileAttributesExW = NULL;
-
+
p_SetFileAttributesW = NULL;
-
+
p_FindFirstFileW = NULL;
p_FindNextFileW = NULL;
p_SetCurrentDirectoryW = NULL;
#ifdef WIN32_VSS
switch (dwMinorVersion) {
case 1:
- g_pVSSClient = new VSSClientXP();
- atexit(VSSCleanup);
- break;
+ g_pVSSClient = new VSSClientXP();
+ atexit(VSSCleanup);
+ break;
case 2:
- g_pVSSClient = new VSSClient2003();
- atexit(VSSCleanup);
- break;
+ g_pVSSClient = new VSSClient2003();
+ atexit(VSSCleanup);
+ break;
}
-#endif
+#endif /* WIN32_VSS */
}
#endif
switch (item->type) {
case R_DIRECTOR:
return authenticate_director(jcr, monitor, (DIRRES*)item->resource);
- break;
case R_CLIENT:
return authenticate_file_daemon(jcr, monitor, (CLIENT*)item->resource);
- break;
case R_STORAGE:
return authenticate_storage_daemon(jcr, monitor, (STORE*)item->resource);
- break;
default:
printf("Error, currentitem is not a Client or a Storage..\n");
gtk_main_quit();
return FALSE;
}
+ return false;
}
static gboolean blink(gpointer data) {
from c:\bacula\uninstall.exe
*/
if (g_pVSSClient && enable_vss == 1) {
- POOLMEM* pszBuf = get_pool_memory (PM_FNAME);
- pszBuf = check_pool_memory_size(pszBuf, dwSize);
- bstrncpy (pszBuf, tname, strlen(tname)+1);
- g_pVSSClient->GetShadowPath(pszBuf,tname,dwSize);
- free_pool_memory(pszBuf);
+ POOLMEM *pszBuf = get_pool_memory (PM_FNAME);
+ pszBuf = check_pool_memory_size(pszBuf, dwSize);
+ bstrncpy(pszBuf, tname, strlen(tname)+1);
+ g_pVSSClient->GetShadowPath(pszBuf, tname, dwSize);
+ free_pool_memory(pszBuf);
}
#endif
}
-BOOL VSSClient::GetShadowPath (const char* szFilePath, char* szShadowPath, int nBuflen)
+BOOL VSSClient::GetShadowPath (const char *szFilePath, char *szShadowPath, int nBuflen)
{
if (!m_bBackupIsInitialized)
return FALSE;
if (bIsValidName) {
int nDriveIndex = toupper(szFilePath[0])-'A';
if (m_szShadowCopyName[nDriveIndex][0] != 0) {
- strncpy (szShadowPath, m_szShadowCopyName[nDriveIndex], nBuflen);
- nBuflen -= (int) strlen (m_szShadowCopyName[nDriveIndex]);
- strncat (szShadowPath, szFilePath+2,nBuflen);
-
+ strncpy(szShadowPath, m_szShadowCopyName[nDriveIndex], nBuflen);
+ nBuflen -= (int)strlen(m_szShadowCopyName[nDriveIndex]);
+ strncat(szShadowPath, szFilePath+2, nBuflen);
return TRUE;
}
}
- strncpy (szShadowPath, szFilePath, nBuflen);
+ strncpy(szShadowPath, szFilePath, nBuflen);
return FALSE;
}
const size_t GetWriterCount();
const char* GetWriterInfo(size_t nIndex);
const int GetWriterState(size_t nIndex);
+ const BOOL IsInitialized() { return m_bBackupIsInitialized; };
private:
virtual BOOL Initialize(DWORD dwContext, BOOL bDuringRestore = FALSE) = 0;
hr = pAsync->QueryStatus(&hrReturned, NULL);
// Check if the async operation succeeded...
- if(FAILED(hrReturned))
- {
+ if(FAILED(hrReturned)) {
PWCHAR pwszBuffer = NULL;
DWORD dwRet = ::FormatMessageW(
FORMAT_MESSAGE_ALLOCATE_BUFFER
(LPWSTR)&pwszBuffer, 0, NULL);
// No message found for this error. Just return <Unknown>
- if (dwRet != 0)
- {
- // Convert the message into wstring
-
+ if (dwRet != 0) {
LocalFree(pwszBuffer);
}
}
m_uidCurrentSnapshotSet = GUID_NULL;
- IVssBackupComponents* pVss = (IVssBackupComponents*) m_pVssObject;
+ IVssBackupComponents *pVss = (IVssBackupComponents*)m_pVssObject;
// 1. InitializeForBackup
HRESULT hr = pVss->InitializeForBackup();
return NULL;
}
-void console_thread::Write(const char* str) {
+void console_thread::Write(const char* str)
+{
if (UA_sock) {
UA_sock->msglen = strlen(str);
pm_strcpy(&UA_sock->msg, str);
bnet_send(UA_sock);
- }
- else if (choosingdirector) {
-
+ } else if (choosingdirector) {
// wxString number = str;
// number.RemoveLast(); /* Removes \n */
long val;
// if (number.ToLong(&val)) {
- if (val = atol(str)) {
+ val = atol(str);
+ if (val) {
directorchoosen = (int)val;
- }
- else {
+ } else {
directorchoosen = 0;
}
}