logo

oasis

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

0032-rsync-Fix-some-incorrect-format-specifiers.patch (1614B)


  1. From e2bc701601abc23299d9a694cb3173bdb44fff83 Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Thu, 4 Jun 2020 21:36:24 -0700
  4. Subject: [PATCH] rsync: Fix some incorrect format specifiers
  5. ---
  6. usr.bin/rsync/fargs.c | 4 ++--
  7. usr.bin/rsync/uploader.c | 2 +-
  8. 2 files changed, 3 insertions(+), 3 deletions(-)
  9. diff --git a/usr.bin/rsync/fargs.c b/usr.bin/rsync/fargs.c
  10. index cbc8537f38c..0b1c255550d 100644
  11. --- a/usr.bin/rsync/fargs.c
  12. +++ b/usr.bin/rsync/fargs.c
  13. @@ -134,9 +134,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
  14. /* --devices is sent as -D --no-specials */
  15. addargs(&args, "--no-specials");
  16. if (sess->opts->max_size >= 0)
  17. - addargs(&args, "--max-size=%lld", sess->opts->max_size);
  18. + addargs(&args, "--max-size=%jd", (intmax_t)sess->opts->max_size);
  19. if (sess->opts->min_size >= 0)
  20. - addargs(&args, "--min-size=%lld", sess->opts->min_size);
  21. + addargs(&args, "--min-size=%jd", (intmax_t)sess->opts->min_size);
  22. /* extra options for the receiver (local is sender) */
  23. if (f->mode == FARGS_SENDER) {
  24. diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c
  25. index 6cb6d054da7..09fedfaadbc 100644
  26. --- a/usr.bin/rsync/uploader.c
  27. +++ b/usr.bin/rsync/uploader.c
  28. @@ -1020,7 +1020,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
  29. init_blk(&blk.blks[i], &blk, offs, i, mbuf, sess);
  30. offs += blk.len;
  31. LOG3(
  32. - "i=%ld, offs=%lld, msz=%ld, blk.len=%lu, blk.rem=%lu",
  33. + "i=%zu, offs=%td, msz=%zd, blk.len=%zu, blk.rem=%zu",
  34. i, offs, msz, blk.len, blk.rem);
  35. i++;
  36. } while (i < blk.blksz);
  37. --
  38. 2.49.0