Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9b3318b
)
Allow --read-batch=- to indicate stdin.
author
Wayne Davison
<wayned@samba.org>
Thu, 15 Jul 2004 17:01:51 +0000
(17:01 +0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 15 Jul 2004 17:01:51 +0000
(17:01 +0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
e0a9045
..
a94dfe8
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1074,9
+1074,13
@@
int main(int argc,char *argv[])
if (write_batch)
write_batch_argvs_file(orig_argc, orig_argv);
- batch_fd = do_open(batch_name,
+ if (read_batch && strcmp(batch_name, "-") == 0)
+ batch_fd = STDIN_FILENO;
+ else {
+ batch_fd = do_open(batch_name,
write_batch ? O_WRONLY | O_CREAT | O_TRUNC
: O_RDONLY, S_IRUSR | S_IWUSR);
+ }
if (batch_fd < 0) {
rsyserr(FERROR, errno, "Batch file %s open error",
batch_name);