logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0036-rsync-Pass-long-long-to-scan_scaled.patch (1113B)


  1. From 0b46c097e66f06fc7e5b4817e6cfdbb145bf4825 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Wed, 27 Apr 2022 20:03:45 -0700
  4. Subject: [PATCH] rsync: Pass long long * to scan_scaled
  5. off_t might not be long long.
  6. ---
  7. usr.bin/rsync/main.c | 7 +++++--
  8. 1 file changed, 5 insertions(+), 2 deletions(-)
  9. diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
  10. index d59848f0214..477adbbba50 100644
  11. --- a/usr.bin/rsync/main.c
  12. +++ b/usr.bin/rsync/main.c
  13. @@ -361,6 +361,7 @@ main(int argc, char *argv[])
  14. struct fargs *fargs;
  15. char **args;
  16. const char *errstr;
  17. + long long size;
  18. /* Global pledge. */
  19. @@ -509,12 +510,14 @@ basedir:
  20. opts.basedir[basedir_cnt++] = optarg;
  21. break;
  22. case OP_MAX_SIZE:
  23. - if (scan_scaled(optarg, &opts.max_size) == -1)
  24. + if (scan_scaled(optarg, &size) == -1)
  25. err(1, "bad max-size");
  26. + opts.max_size = size;
  27. break;
  28. case OP_MIN_SIZE:
  29. - if (scan_scaled(optarg, &opts.min_size) == -1)
  30. + if (scan_scaled(optarg, &size) == -1)
  31. err(1, "bad min-size");
  32. + opts.max_size = size;
  33. break;
  34. case 'h':
  35. default:
  36. --
  37. 2.49.0