diff options
author | Richard Sharpe <sharpe@samba.org> | 1999-01-17 01:03:52 +0000 |
---|---|---|
committer | Richard Sharpe <sharpe@samba.org> | 1999-01-17 01:03:52 +0000 |
commit | 8dac09c5a15bbf17cf69975bff84106eba6147e9 (patch) | |
tree | 3c7b2010be4dad692fe3d2f93f64b1cecb297fc8 /source3/client | |
parent | 2cc786548b4460525ce2e0bf09209eee48a5ea08 (diff) | |
download | samba-8dac09c5a15bbf17cf69975bff84106eba6147e9.tar.gz samba-8dac09c5a15bbf17cf69975bff84106eba6147e9.tar.bz2 samba-8dac09c5a15bbf17cf69975bff84106eba6147e9.zip |
A small change to clitar.c (really, I promise :-)
If we are writing the tar file to stdout, set dbf to stderr
so that we do not screw up tar output with log info etc.
Compiles clean and tested with 38MB backup. Honest :-)
(This used to be commit 57301a3eb4723d0790822d3409da788fec4d8378)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/clitar.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 4978a4dec1..dcc176b9d1 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -71,6 +71,7 @@ stack dir_stack = {NULL, 0}; /* Want an empty stack */ #define SEPARATORS " \t\n\r" extern int DEBUGLEVEL; extern struct cli_state *cli; +extern FILE *dbf; /* These defines are for the do_setrattr routine, to indicate * setting and reseting of file attributes in the function call */ @@ -1818,6 +1819,12 @@ int tar_parseargs(int argc, char *argv[], char *Optarg, int Optind) if (Optind>=argc || !strcmp(argv[Optind], "-")) { /* Sets tar handle to either 0 or 1, as appropriate */ tarhandle=(tar_type=='c'); + /* + * Make sure that dbf points to stderr if we are using stdout for + * tar output + */ + if (tarhandle == 1) + dbf = stderr; } else { if (tar_type=='c' && (dry_run || strcmp(argv[Optind], "/dev/null")==0)) { |