* General routines for handling the various checksum supported.
*/
-/*
- Copyright (C) 2000-2004 Kern Sibbald and John Walker
-
- 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.
-
- 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.
-
- */
-
-#ifndef _CHKSUM_H_
-#define _CHKSUM_H_
-
-#include "bacula.h"
-
-/*
- * Link these to findlib options. Doing so allows for simpler handling of
- * signatures in the callers.
- * If multiple signatures are specified, the order in chksum_init() matters.
- * Still, spell out our own names in case we want to change the approach.
- */
-#define CHKSUM_NONE 0
-#define CHKSUM_MD5 FO_MD5
-#define CHKSUM_SHA1 FO_SHA1
-
-union chksumContext {
- MD5Context md5;
- SHA1Context sha1;
-};
-
-struct CHKSUM {
- int type; /* One of CHKSUM_* above */
- char name[5]; /* Big enough for NONE, MD5, SHA1, etc. */
- bool updated; /* True if updated by chksum_update() */
- chksumContext context; /* Context for the algorithm at hand */
- int length; /* Length of signature */
- unsigned char signature[30]; /* Large enough for either signature */
-};
-
-int chksum_init(CHKSUM *chksum, int flags);
-int chksum_update(CHKSUM *chksum, void *buf, unsigned len);
-int chksum_final(CHKSUM *chksum);
-
-#endif
-/*
- * General routines for handling the various checksum supported.
- */
-
/*
Copyright (C) 2004 Kern Sibbald
findFOPTS *fo = (findFOPTS *)incexe->opts_list.get(j);
ff->flags |= fo->flags;
ff->GZIP_level = fo->GZIP_level;
- ff->fstypes = &(fo->fstype);
+ ff->fstypes = fo->fstype;
bstrncat(ff->VerifyOpts, fo->VerifyOpts, sizeof(ff->VerifyOpts));
}
for (j=0; j<incexe->name_list.size(); j++) {
ff->GZIP_level = fo->GZIP_level;
ff->reader = fo->reader;
ff->writer = fo->writer;
- ff->fstypes = &(fo->fstype);
+ ff->fstypes = fo->fstype;
ic = (ff->flags & FO_IGNORECASE) ? FNM_CASEFOLD : 0;
for (k=0; k<fo->wild.size(); k++) {
if (fnmatch((char *)fo->wild.get(k), ff->fname, fnmode|ic) == 0) {
* Kern Sibbald MIM
*/
/*
- Copyright (C) 2000-2004 Kern Sibbald and John Walker
+ Copyright (C) 2000-2004 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
int GZIP_level; /* compression level */
char *reader; /* reader program */
char *writer; /* writer program */
- alist *fstypes; /* allowed file system types */
+ alist fstypes; /* allowed file system types */
/* List of all hard linked files found */
struct f_link *linklist; /* hard linked files */
char *fs;
bool accept = true;
- if (ff->fstypes->size()) {
+ if (ff->fstypes.size()) {
accept = false;
fs = fstype(ff->fname);
if (fs == NULL) {
Dmsg1(50, "Cannot determine file system type for \"%s\"\n", ff->fname);
} else {
- for (i = 0; i < ff->fstypes->size(); ++i) {
- if (strcmp(fs, (char *)ff->fstypes->get(i)) == 0) {
+ for (i = 0; i < ff->fstypes.size(); ++i) {
+ if (strcmp(fs, (char *)ff->fstypes.get(i)) == 0) {
Dmsg2(100, "Accepting fstype %s for \"%s\"\n", fs, ff->fname);
accept = true;
break;
}
Dmsg3(200, "fstype %s for \"%s\" does not match %s\n", fs,
- ff->fname, ff->fstypes->get(i));
+ ff->fname, ff->fstypes.get(i));
}
free(fs);
}
/* */
#undef VERSION
#define VERSION "1.37.1"
-#define BDATE "12 December 2004"
-#define LSMDATE "12Dec04"
+#define BDATE "17 December 2004"
+#define LSMDATE "17Dec04"
/* Debug flags */
#undef DEBUG