]> git.sur5r.net Git - bacula/bacula/commitdiff
- Apply Preben 'Peppe' Guldberg <peppe@wielders.org>
authorKern Sibbald <kern@sibbald.com>
Fri, 17 Dec 2004 09:27:01 +0000 (09:27 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 17 Dec 2004 09:27:01 +0000 (09:27 +0000)
  alist fix patch.
- Remove duplicate code from chksum.h (mentioned by Preben).

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1762 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/chksum.h
bacula/src/findlib/find.c
bacula/src/findlib/find.h
bacula/src/findlib/find_one.c
bacula/src/version.h

index 125edce5676fb61b8e1faaef3bab718852ff2a31..7d0d45bf1acd46f4fe2ceeb93d062bf183429786 100644 (file)
@@ -2,64 +2,6 @@
  * 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
 
index 8a5d3015da28f14f66cc54979e08a58a808ff205..2b587e25e4198f91ce54895bb645f594ea49f031 100644 (file)
@@ -136,7 +136,7 @@ find_files(JCR *jcr, FF_PKT *ff, int callback(FF_PKT *ff_pkt, void *hpkt), void
            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++) {
@@ -178,7 +178,7 @@ static bool accept_file(FF_PKT *ff)
       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) {
index ba2980965473de3854f77579c3450d1f226b7493..0b62f0da37bf5c1bddc0d595ffacd8f5ed16481a 100755 (executable)
@@ -4,7 +4,7 @@
  *     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
@@ -197,7 +197,7 @@ struct FF_PKT {
    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 */
index 67aa8368908dbfa8cf3ba1bdb9a14f1bd379ae33..2cce54fa10a548523444ae3a9a28b357cd86446f 100755 (executable)
@@ -69,20 +69,20 @@ static int accept_fstype(FF_PKT *ff, void *dummy) {
    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);
       }
index 5ab0248cc0ceb7f1a058c229c58d0fc7ddb52154..10a0c89b5eaa029f88aaa269a789b846d9592b6e 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #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