1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From 0e9ff28bc2e5bd4828b98b50333d12a6d24486fe Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Wed, 27 Apr 2022 20:03:45 -0700
Subject: [PATCH] rsync: Pass long long * to scan_scaled
off_t might not be long long.
---
usr.bin/rsync/main.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
index dd175597914..5d7f055a9ae 100644
--- a/usr.bin/rsync/main.c
+++ b/usr.bin/rsync/main.c
@@ -353,6 +353,7 @@ main(int argc, char *argv[])
struct fargs *fargs;
char **args;
const char *errstr;
+ long long size;
/* Global pledge. */
@@ -488,12 +489,14 @@ basedir:
opts.basedir[basedir_cnt++] = optarg;
break;
case OP_MAX_SIZE:
- if (scan_scaled(optarg, &opts.max_size) == -1)
+ if (scan_scaled(optarg, &size) == -1)
err(1, "bad max-size");
+ opts.max_size = size;
break;
case OP_MIN_SIZE:
- if (scan_scaled(optarg, &opts.min_size) == -1)
+ if (scan_scaled(optarg, &size) == -1)
err(1, "bad min-size");
+ opts.max_size = size;
break;
case OP_VERSION:
fprintf(stderr, "openrsync: protocol version %u\n",
--
2.37.3
|