diff options
author | Wayne Davison <wayned@samba.org> | 2004-01-27 23:13:13 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-01-27 23:13:13 +0000 |
commit | c3e5e5851be229b46440ca5660dff0ae2b526455 (patch) | |
tree | ccf3100943280dbc06e111e5621ffafbe355be0c | |
parent | 4337c8f856340f398695811ddaa5c6f8d005379f (diff) | |
download | rsync-c3e5e5851be229b46440ca5660dff0ae2b526455.tar.gz |
New function: who_am_i() returns "sender", "receiver", or "generator".
-rw-r--r-- | rsync.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -26,6 +26,9 @@ extern int verbose; extern int dry_run; extern int preserve_times; extern int am_root; +extern int am_server; +extern int am_sender; +extern int am_generator; extern int preserve_uid; extern int preserve_gid; extern int preserve_perms; @@ -240,3 +243,8 @@ void finish_transfer(char *fname, char *fnametmp, struct file_struct *file) set_perms(fname,file,NULL,0); } } + +const char *who_am_i(void) +{ + return am_sender ? "sender" : am_generator ? "generator" : "receiver"; +} |