OpenBSD CVS

CVS log for src/usr.bin/rsync/io.c


[BACK] Up to [local] / src / usr.bin / rsync

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:02 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.22 / (download) - annotate - [select for diffs], Tue Apr 12 14:51:04 2022 UTC (2 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

Do not convert the int value twice from little to host endian.
io_read_int() already does the conversion so don't double up in
io_read_ulong(). Fixes openrsync on sparc64.
OK miod@ deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 28 11:59:48 2021 UTC (2 years, 4 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

In io_write_buf() adjust the calculation of the multiplex message size
so that the loop works even for buffers bigger than 0xffffff. The code
does not produce such big buffers but better make the code correct.
Reported by Blago Dachev (blago (at) dachev (dot) com)
OK benno@

Revision 1.20 / (download) - annotate - [select for diffs], Wed Jun 30 13:10:04 2021 UTC (2 years, 10 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.19: +1 -1 lines
Diff to previous 1.19 (colored)

Replace Id: tags with OpenBSD: tags
OK deraadt@

Revision 1.19 / (download) - annotate - [select for diffs], Tue Nov 24 16:54:44 2020 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.18: +3 -3 lines
Diff to previous 1.18 (colored)

Simple implementation of --timeout to exit after specified seconds of I/O
inactivity. By default rsync will wait forever but this results in stuck
processes if the remote side does not answer properly as seen in rpki-client.
OK job@ benno@

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.17 / (download) - annotate - [select for diffs], Wed May 8 21:30:11 2019 UTC (5 years ago) by benno
Branch: MAIN
Changes since 1.16: +28 -33 lines
Diff to previous 1.16 (colored)

remove sess argument from all functions that only used it for logging
functions.
ok deraadt@

Revision 1.16 / (download) - annotate - [select for diffs], Wed May 8 20:00:25 2019 UTC (5 years ago) by benno
Branch: MAIN
Changes since 1.15: +44 -44 lines
Diff to previous 1.15 (colored)

remove sess argument from log functions. ok deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 31 09:26:05 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.14: +49 -26 lines
Diff to previous 1.14 (colored)

Increasing strictness regarding signed-vs-unsigned types and their range
in the io-path, whic is done by seperating int vs uint functions variants.
reviewed by naddy, florian, and jsg

Revision 1.14 / (download) - annotate - [select for diffs], Tue Mar 26 17:13:42 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Same INT32_MAX vs -1 confusion on the write-side
(previous commit was for read-side)

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 26 16:20:03 2019 UTC (5 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

INT32_MAX isn't -1, to indicate re-read for 64-bit value.
Diagnosed by krw, ok florian

Revision 1.12 / (download) - annotate - [select for diffs], Mon Feb 18 22:47:34 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.11: +2 -3 lines
Diff to previous 1.11 (colored)

new attempt to sync with kristaps up to Sun Feb 17 2019

339cf5998c0c022623cd68de50722b6c14543952 Push "error trail" further into code.

baf58ce5fe1bc6ce431b3b0ac8264b83ae8c7d02 Document all arguments.  Add
common -av usage.  Remove bits about not supporting anything but
files/dirs.

821a811a8c80e52fb56b241fc65a16cae1b4fb2c Disambiguate as prodded by deraadt@

6c4475b8f226e9031ec0ec1b3f14f7d347132c87 Add -h to usage string

4d344ae6156873b44c95de0c1ed629e637c2d7ab Clarify error message
language, use service name instead of port, specify that the socket is
SOCK_STREAM.  From deraadt@.  Tweaked for lowercase messages.

f3ec049e76257fc96bcdc872f1d3b967b98f3eb6 In consideration to benno@'s
comments, let the mktemp functions propogate an errno handled by the
caller.  Also keep the original line lengths.  While in mktemp.c, make
some defines into an enum.

e116c2bd00e634b56e4276120135915ceaa31cf2 Put the FSM of the sender
into its own function.  Put dry_run ack and end of phase ack into the
send buffer too, further reducing the possibility of deadlock.

c7745aa4c7394ca89d841f8ee76782256d694340 Make the sender write loop be
fully non-blocking.  This frees us of deadlocking the protocol because
the sender will always be able to pull down data.

93c7b4843e80aeac2ec6ae6ffc395df4deaf4a31 Remove "yoda" notation to be
more in tune with OpenBSD.  Most found by deraadt@.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 18 21:55:27 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.10: +3 -2 lines
Diff to previous 1.10 (colored)

revert previous

Revision 1.10 / (download) - annotate - [select for diffs], Mon Feb 18 21:34:54 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.9: +2 -3 lines
Diff to previous 1.9 (colored)

sync with kristaps up to Sun Feb 17 2019

339cf5998c0c022623cd68de50722b6c14543952 Push "error trail" further into code.

baf58ce5fe1bc6ce431b3b0ac8264b83ae8c7d02 Document all arguments.  Add
  common -av usage.  Remove bits about not supporting anything but
  files/dirs.

821a811a8c80e52fb56b241fc65a16cae1b4fb2c Disambiguate as prodded by deraadt@

6c4475b8f226e9031ec0ec1b3f14f7d347132c87 Add -h to usage string

4d344ae6156873b44c95de0c1ed629e637c2d7ab Clarify error message
  language, use service name instead of port, specify that the socket is
  SOCK_STREAM.  From deraadt@.  Tweaked for lowercase messages.

f3ec049e76257fc96bcdc872f1d3b967b98f3eb6 In consideration to benno@'s
  comments, let the mktemp functions propogate an errno handled by the
  caller.  Also keep the original line lengths.  While in mktemp.c, make
  some defines into an enum.

e116c2bd00e634b56e4276120135915ceaa31cf2 Put the FSM of the sender
  into its own function.  Put dry_run ack and end of phase ack into the
  send buffer too, further reducing the possibility of deadlock.

c7745aa4c7394ca89d841f8ee76782256d694340 Make the sender write loop be
  fully non-blocking.  This frees us of deadlocking the protocol because
  the sender will always be able to pull down data.

93c7b4843e80aeac2ec6ae6ffc395df4deaf4a31 Remove "yoda" notation to be
  more in tune with OpenBSD.  Most found by deraadt@.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Feb 17 16:34:04 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

more yoda repairs

Revision 1.8 / (download) - annotate - [select for diffs], Sat Feb 16 16:58:39 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.7: +1 -7 lines
Diff to previous 1.7 (colored)

sync with kristaps, commit 1842d31d600f2834ae78fe0d99a29519a853d75c
Make sender mostly nonblocking for writes.  This takes a lot of logic once
in blocks.c and puts it directly into sender.c.  It allows running openrsync
against itself without deadlocks.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 16:58:14 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.6: +145 -22 lines
Diff to previous 1.6 (colored)

sync with kristaps, commit d01f1b87a06c25353de28a9df45b3e202614b336
Add the lowbuffer routines.  I'll use this in subsequent commits, but they
pre-add the multiplexing frame instead of doing so during write.  While here,
clean up a lot of ERRX -> ERRX1 and add documentation.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 16 16:57:17 2019 UTC (5 years, 3 months ago) by florian
Branch: MAIN
Changes since 1.5: +13 -3 lines
Diff to previous 1.5 (colored)

sync with kristaps, commit f5c1e234990877cd274b7bcdd4d9883104cd1568
Make sender have reentrant sending and prioritised reading.  This way,
the sender gets data off the wire as quickly as possible.  While here,
remove dead wood from blocks.c (blk_merge).

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 16 05:06:30 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.4: +5 -7 lines
Diff to previous 1.4 (colored)

unwrap lines which do not need wrapping

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 11 21:41:22 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.3: +14 -15 lines
Diff to previous 1.3 (colored)

swap comparison arguments as needed, to match idiomatic C most of us
are familiar with.  Proofed by florian and benno

Revision 1.3 / (download) - annotate - [select for diffs], Mon Feb 11 19:18:36 2019 UTC (5 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +25 -25 lines
Diff to previous 1.2 (colored)

cleanup weird spaces around !.  (We normalize source-code to a standard
idiom because it is less error prone for a larger team.  kristaps idiom
is highly divergent)
ok benno

Revision 1.2 / (download) - annotate - [select for diffs], Sun Feb 10 23:24:14 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN
Changes since 1.1: +8 -9 lines
Diff to previous 1.1 (colored)

fix whitespace

Revision 1.1 / (download) - annotate - [select for diffs], Sun Feb 10 23:18:28 2019 UTC (5 years, 3 months ago) by benno
Branch: MAIN

Import Kristaps' openrsync into the tree.
OK deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.