]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/filed/restore.c
This commit was manufactured by cvs2svn to create tag
[bacula/bacula] / bacula / src / filed / restore.c
index ae1ff8e00e02ee0a40dea98866aee6dca1174216..3b41655ff9aad645595ddad7a4fa6ac8e4f06704 100644 (file)
@@ -35,7 +35,6 @@ static char rec_header[] = "rechdr %ld %ld %ld %ld %ld";
 #ifdef HAVE_LIBZ
 static const char *zlib_strerror(int stat);
 #endif
-
 int32_t extract_data(JCR *jcr, BFILE *bfd, POOLMEM *buf, int32_t buflen,
       uint64_t *addr, int flags);
 
@@ -53,7 +52,7 @@ int bclose_chksize(JCR *jcr, BFILE *bfd, off_t osize)
    fsize = blseek(bfd, 0, SEEK_CUR);
    bclose(bfd);                              /* first close file */
    if (fsize > 0 && fsize != osize) {
-      Jmsg3(jcr, M_ERROR, 0, _("Size of data or stream of %s not correct. Original %s, restored %s.\n"),
+      Qmsg3(jcr, M_ERROR, 0, _("Size of data or stream of %s not correct. Original %s, restored %s.\n"),
             jcr->last_fname, edit_uint64(osize, ec1),
             edit_uint64(fsize, ec2));
       return -1;
@@ -227,7 +226,7 @@ void do_restore(JCR *jcr)
 
          attr->data_stream = decode_stat(attr->attr, &attr->statp, &attr->LinkFI);
 
-         if (!is_stream_supported(attr->data_stream)) {
+         if (!is_restore_stream_supported(attr->data_stream)) {
             if (!non_support_data++) {
                Jmsg(jcr, M_ERROR, 0, _("%s stream not supported on this Client.\n"),
                   stream_to_ascii(attr->data_stream));
@@ -252,9 +251,9 @@ void do_restore(JCR *jcr)
             extract = true;
             /* FALLTHROUGH */
          case CF_CREATED:        /* File created, but there is no content */
-            P(jcr->mutex);
+            jcr->lock();
             pm_strcpy(jcr->last_fname, attr->ofname);
-            V(jcr->mutex);
+            jcr->unlock();
             jcr->JobFiles++;
             fileAddr = 0;
             print_ls_output(jcr, attr);
@@ -291,12 +290,6 @@ void do_restore(JCR *jcr)
                   || stream == STREAM_WIN32_GZIP_DATA) {
                flags |= FO_GZIP;
             }
-
-            if (is_win32_stream(stream) && !have_win32_api()) {
-               set_portable_backup(&bfd);
-               flags |= FO_WIN32DECOMP;    /* "decompose BackupWrite data */
-            }
-
             if (extract_data(jcr, &bfd, sd->msg, sd->msglen, &fileAddr, flags) < 0) {
                extract = false;
                bclose(&bfd);
@@ -541,17 +534,6 @@ int32_t extract_data(JCR *jcr, BFILE *bfd, POOLMEM *buf, int32_t buflen,
       Dmsg2(30, "Write %u bytes, total before write=%s\n", wsize, edit_uint64(jcr->JobBytes, ec1));
    }
 
-#ifdef USE_WIN32STREAMEXTRACTION
-   if (flags & FO_WIN32DECOMP) {
-      if (!processWin32BackupAPIBlock(bfd, wbuf, wsize)) {
-         berrno be;
-         Jmsg2(jcr, M_ERROR, 0, _("Write error in Win32 Block Decomposition on %s: %s\n"), 
-               jcr->last_fname, be.strerror(bfd->berrno));
-         return -1;
-      }
-   }
-   else
-#endif
    if (bwrite(bfd, wbuf, wsize) != (ssize_t)wsize) {
       berrno be;
       Jmsg2(jcr, M_ERROR, 0, _("Write error on %s: %s\n"),