From 4a13b9d57ac9cd848d7644886e12fd3aae3f70c4 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Thu, 26 Oct 2000 07:31:29 +0000 Subject: [PATCH] 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. --- authenticate.c | 7 ++++--- 1 file 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; } -- 2.34.1