Web lists-archives.com

Re: rsync error -- "Protocol incompatibility" Why?




On 05/28/2018 08:08 AM, David wrote:
On 28 May 2018 at 22:47, Richard Owlett <rowlett@xxxxxxxxxxx> wrote:

But that raises another question.
Why does error message identify a protocol problem after having correctly
identified the problem as "No such file or directory".

man rsync says:
"EXIT VALUES
        0      Success
        1      Syntax or usage error
        2      Protocol incompatibility
[etc]
"

An *exit value* (aka exit status) is an entirely
different concept to an "error number".

Exit status is partially explained here:
http://mywiki.wooledge.org/BashGuide/TestsAndConditionals?highlight=%28exit%29%7C%28status%29#Exit_Status

The exit status = 2 mentioned in the man page has nothing
to do with the 2 in the error message
"rsync: change_dir "/media/root/drescued_commo" failed: No such file
or directory (2)"

The 2 in that message is a reference to errors reported by the standard
library of the C programming language, as explained here:
https://www.ibm.com/developerworks/aix/library/au-errnovariable/index.html



Thank you. One of those things a non-programmer has to crash into.
My formal programming background is CORC, CUPL, and a dash of FORTRAN (of a similar vintage).