/*
- Bacula® - The Network Backup Solution
+ Bacula® - The Network Backup Solution
- Copyright (C) 2010-2010 Bacula Systems(R) SA
+ Copyright (C) 2010-2014 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.
- This program is Free Software; you can modify it under the terms of
- version three of the GNU Affero General Public License as published by the Free
- Software Foundation, which is listed in the file LICENSE.
+ The main author of Bacula is Kern Sibbald, with contributions from many
+ others, a complete list can be found in the file AUTHORS.
- 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 may use this file and others of this release according to the
+ license defined in the LICENSE file, which includes the Affero General
+ Public License, v3.0 ("AGPLv3") and some additional permissions and
+ terms pursuant to its AGPLv3 Section 7.
- You should have received a copy of the GNU Affero General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA.
+ Bacula® is a registered trademark of Kern Sibbald.
- Bacula® is a registered trademark of Kern Sibbald.
- Bacula Systems(R) is a trademark of Bacula Systems SA.
- Bacula Enterprise(TM) is a trademark of Bacula Systems SA.
-
- The licensor of Bacula Enterprise(TM) is Bacula Systems(R) SA,
- Rue Galilee 5, 1400 Yverdon-les-Bains, Switzerland.
*/
/* You can include this file to your plugin to have
DLL_IMP_EXP void sm_free(const char *file, int line, void *fp);
DLL_IMP_EXP void *reallymalloc(const char *fname, int lineno, unsigned int nbytes);
DLL_IMP_EXP void reallyfree(const char *file, int line, void *fp);
-DLL_IMP_EXP void sm_check(const char *fname, int lineno, bool dump);
#ifndef bmalloc
# define bmalloc(s) sm_malloc(__FILE__, __LINE__, (s))
sm_free(__FILE__, __LINE__, buf);
}
-#define Dmsg(context, level, message, ...) bfuncs->DebugMessage(context, __FILE__, __LINE__, level, message, ##__VA_ARGS__)
-#define Jmsg(context, type, message, ...) bfuncs->JobMessage(context, __FILE__, __LINE__, type, 0, message, ##__VA_ARGS__)
+#define Dmsg(context, level, ...) bfuncs->DebugMessage(context, __FILE__, __LINE__, level, __VA_ARGS__ )
+#define Jmsg(context, type, ...) bfuncs->JobMessage(context, __FILE__, __LINE__, type, 0, __VA_ARGS__ )
+
+
+#ifdef USE_ADD_DRIVE
+/* Keep drive letters for windows vss snapshot */
+static void add_drive(char *drives, int *nCount, char *fname) {
+ if (strlen(fname) >= 2 && B_ISALPHA(fname[0]) && fname[1] == ':') {
+ /* always add in uppercase */
+ char ch = toupper(fname[0]);
+ /* if not found in string, add drive letter */
+ if (!strchr(drives,ch)) {
+ drives[*nCount] = ch;
+ drives[*nCount+1] = 0;
+ (*nCount)++;
+ }
+ }
+}
+
+/* Copy our drive list to Bacula core list */
+static void copy_drives(char *drives, char *dest) {
+ int last = strlen(dest); /* dest is 27 bytes long */
+ for (char *p = drives; *p && last < 26; p++) {
+ if (!strchr(dest, *p)) {
+ dest[last++] = *p;
+ dest[last] = 0;
+ }
+ }
+}
+#endif
#endif