]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/verify.c
Add Raw file save/restore
[bacula/bacula] / bacula / src / filed / verify.c
index 75e8d32bd0fe3e7ad77d17f72e919a2c4fb32491..1888bf5be46a40107afe4e141bc05bde9ff5ccb7 100644 (file)
@@ -7,7 +7,7 @@
  *
  */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
+   Copyright (C) 2000-2003 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
@@ -60,9 +60,6 @@ void do_verify(JCR *jcr)
 
 /* 
  * Called here by find() for each file.
-
-    *****FIXME*****   add FSMs File System Modules
  *
  *  Find the file, compute the MD5 and send it back to the Director
  */
@@ -102,6 +99,9 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
    case FT_SPEC:
       Dmsg1(30, "FT_SPEC saving: %s\n", ff_pkt->fname);
       break;
+   case FT_RAW:
+      Dmsg1(30, "FT_RAW saving: %s\n", ff_pkt->fname);
+      break;
    case FT_NOACCESS:
       Jmsg(jcr, M_NOTSAVED, -1, _("     Could not access %s: ERR=%s\n"), ff_pkt->fname, strerror(ff_pkt->ff_errno));
       return 1;
@@ -133,8 +133,8 @@ static int verify_file(FF_PKT *ff_pkt, void *pkt)
    }
 
 
-   if (ff_pkt->type != FT_LNKSAVED && S_ISREG(ff_pkt->statp.st_mode) && 
-        ff_pkt->statp.st_size > 0) {
+   if (ff_pkt->type != FT_LNKSAVED && (S_ISREG(ff_pkt->statp.st_mode) && 
+        ff_pkt->statp.st_size > 0) || ff_pkt->type == FT_RAW) {
       if ((fid = open(ff_pkt->fname, O_RDONLY | O_BINARY)) < 0) {
         ff_pkt->ff_errno = errno;
          Jmsg(jcr, M_NOTSAVED, -1, _("     Cannot open %s: ERR=%s.\n"), ff_pkt->fname, strerror(ff_pkt->ff_errno));