diff options
author | Martin Pool <mbp@samba.org> | 2000-10-26 07:31:29 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2000-10-26 07:31:29 +0000 |
commit | 4a13b9d57ac9cd848d7644886e12fd3aae3f70c4 (patch) | |
tree | 7e8be8546b4a45bf6111297a2e4e8e0502ea1fe1 /authenticate.c | |
parent | a039749b4c21e3439dc06fcdd5355828f1f95463 (diff) | |
download | android_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.tar.gz android_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.tar.bz2 android_external_rsync-4a13b9d57ac9cd848d7644886e12fd3aae3f70c4.zip |
Print strerror when a system error occurs; add a new function rsyserr
to do this. This is not used in every case yet -- I've just changed a
few cases that were causing trouble. Please convert others as you see them.
Diffstat (limited to 'authenticate.c')
-rw-r--r-- | authenticate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/authenticate.c b/authenticate.c index 842a59ee..9aae72d3 100644 --- a/authenticate.c +++ b/authenticate.c @@ -1,5 +1,6 @@ -/* - Copyright (C) Andrew Tridgell 1998 +/* -*- c-file-style: "linux"; -*- + + Copyright (C) 1998-2000 by Andrew Tridgell This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -144,7 +145,7 @@ static char *getpassf(char *filename) if (!filename) return NULL; if ( (fd=open(filename,O_RDONLY)) == -1) { - rprintf(FERROR,"could not open password file \"%s\"\n",filename); + rsyserr(FERROR, errno, "could not open password file \"%s\"",filename); if (envpw) rprintf(FERROR,"falling back to RSYNC_PASSWORD environment variable.\n"); return NULL; } |