#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);
flags |= FO_GZIP;
}
-#ifdef USE_WIN32STREAMEXTRACTION
-/* THIS DETERMINES IF WE USE THE WIN32 BACKUPSTREAM DECOMPOSITION */
if (is_win32_stream(stream) && !have_win32_api()) {
set_portable_backup(&bfd);
- flags |= FO_WIN32DECOMP;
+ flags |= FO_WIN32DECOMP; /* "decompose BackupWrite data */
}
-#endif
if (extract_data(jcr, &bfd, sd->msg, sd->msglen, &fileAddr, flags) < 0) {
extract = false;
Copyright (C) 2003-2005 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
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
LONGLONG dwDataOffset = 0;
LONGLONG dwDataLen;
- /* Win32 Stream Header size without name of strem.
- = sizeof (WIN32_STREAM_ID)- sizeof(WCHAR*); */
+ /* Win32 Stream Header size without name of stream.
+ * = sizeof (WIN32_STREAM_ID)- sizeof(WCHAR*);
+ */
DWORD dwSizeHeader = 20;
do {
#ifndef HAVE_LIBZ
case STREAM_GZIP_DATA:
case STREAM_SPARSE_GZIP_DATA:
+ case STREAM_WIN32_GZIP_DATA:
#endif
#ifndef USE_WIN32STREAMEXTRACTION
case STREAM_WIN32_DATA:
- case STREAM_WIN32_GZIP_DATA:
#endif
#ifndef HAVE_DARWIN_OS
case STREAM_MACOS_FORK_DATA:
#endif
#ifdef USE_WIN32STREAMEXTRACTION
case STREAM_WIN32_DATA:
-#endif
-#if defined(USE_WIN32STREAMEXTRACTION) && defined(HAVE_LIBZ)
+# ifdef HAVE_LIBZ
case STREAM_WIN32_GZIP_DATA:
+# endif
#endif
case STREAM_UNIX_ATTRIBUTES:
case STREAM_FILE_DATA:
return 0;
}
-/* Old file reader code */
-#ifdef xxx
- if (bfd->prog) {
- POOLMEM *ecmd = get_pool_memory(PM_FNAME);
- ecmd = edit_job_codes(bfd->jcr, ecmd, bfd->prog, fname);
- const char *pmode;
- if (flags & O_RDONLY) {
- pmode = "r";
- } else {
- pmode = "w";
- }
- bfd->bpipe = open_bpipe(ecmd, 0, pmode);
- if (bfd->bpipe == NULL) {
- bfd->berrno = errno;
- bfd->fid = -1;
- free_pool_memory(ecmd);
- return -1;
- }
- free_pool_memory(ecmd);
- if (flags & O_RDONLY) {
- bfd->fid = fileno(bfd->bpipe->rfd);
- } else {
- bfd->fid = fileno(bfd->bpipe->wfd);
- }
- errno = 0;
- return bfd->fid;
- }
-#endif
-
-
int bopen(BFILE *bfd, const char *fname, int flags, mode_t mode)
{
/* Open reader/writer program */
Copyright (C) 2001-2005 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
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
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.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
#define FO_NO_HARDLINK (1<<15) /* don't handle hard links */
#define FO_IGNORECASE (1<<16) /* Ignore file name case */
#define FO_HFSPLUS (1<<17) /* Resource forks and Finder Info */
-#ifdef USE_WIN32STREAMEXTRACTION
#define FO_WIN32DECOMP (1<<18) /* Use BackupRead decomposition */
-#endif
struct s_included_file {
struct s_included_file *next;