diff options
author | Wayne Davison <wayned@samba.org> | 2005-04-09 18:59:44 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2005-04-09 18:59:44 +0000 |
commit | d630f53e0de8517a4059fb4c89631af05259aa6f (patch) | |
tree | 652707e1bd01982b3b625495fdcd98fca3a91744 /batch.c | |
parent | 5918daf8a42a80bb9db3c787dffd8dead4bcca9f (diff) | |
download | rsync-d630f53e0de8517a4059fb4c89631af05259aa6f.tar.gz rsync-d630f53e0de8517a4059fb4c89631af05259aa6f.tar.bz2 rsync-d630f53e0de8517a4059fb4c89631af05259aa6f.zip |
Also change --only-write-batch to --read-batch (in addition to
changing --write-batch).
Diffstat (limited to 'batch.c')
-rw-r--r-- | batch.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -139,7 +139,7 @@ static void write_filter_rules(int fd) * (hopefully) work. */ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) { - int fd, i; + int fd, i, len; char *p, filename[MAXPATHLEN]; stringjoin(filename, sizeof filename, @@ -175,11 +175,12 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt) continue; } write(fd, " ", 1); - if (strncmp(p, "--write-batch", 13) == 0) { + if (strncmp(p, "--write-batch", len = 13) == 0 + || strncmp(p, "--only-write-batch", len = 18) == 0) { write(fd, "--read-batch", 12); - if (p[13] == '=') { + if (p[len] == '=') { write(fd, "=", 1); - write_arg(fd, p + 14); + write_arg(fd, p + len + 1); } } else write_arg(fd, p); |