diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-02-16 05:36:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-02-16 05:36:08 +0000 |
commit | 786936f9a842833c4b7dc1d44fb46657ff81311f (patch) | |
tree | 2d72618aeb8d43ee7b7caa9afe90f4744f146c37 /usr.bin/rsync | |
parent | 0444afa8cff9f9055419f0364fa0992f9081bc28 (diff) |
a minimal --version long-option, so someone can unconfuse themselves
Diffstat (limited to 'usr.bin/rsync')
-rw-r--r-- | usr.bin/rsync/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c index 7b35440a0ba..8fe0da402b3 100644 --- a/usr.bin/rsync/main.c +++ b/usr.bin/rsync/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.16 2019/02/14 18:32:00 florian Exp $ */ +/* $Id: main.c,v 1.17 2019/02/16 05:36:07 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -299,6 +299,7 @@ main(int argc, char *argv[]) { "recursive", no_argument, &opts.recursive, 1 }, { "times", no_argument, &opts.preserve_times, 1 }, { "group", no_argument, &opts.preserve_gids, 1 }, + { "version", no_argument, NULL, 2 }, { NULL, 0, NULL, 0 }}; /* Global pledge. */ @@ -345,6 +346,10 @@ main(int argc, char *argv[]) case 1: opts.rsync_path = optarg; break; + case 2: + fprintf(stderr, "openrsync: protocol version %u\n", + RSYNC_PROTOCOL); + exit(0); default: goto usage; } |