mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Teach ftpErrString to format UNIX errnos, since at least ftpLogin()
can return UNIX errnos. When UNIX errnos catch up with FTP status codes (e.g. at 100) a new way will have to be found to tell which is which. This allows fetch to print errors like fetch: ftp.fu-berlin.de: No route to host instead of fetch: ftp.fu-berlin.de: Unknown error
This commit is contained in:
parent
1202aab978
commit
b1cb1b02f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30065
@ -14,7 +14,7 @@
|
||||
* Turned inside out. Now returns xfers as new file ids, not as a special
|
||||
* `state' of FTP_t
|
||||
*
|
||||
* $Id: ftpio.c,v 1.26 1997/09/18 14:01:15 phk Exp $
|
||||
* $Id: ftpio.c,v 1.27 1997/10/01 07:21:41 jkh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -182,6 +182,9 @@ ftpErrString(int errno)
|
||||
|
||||
if (errno == -1)
|
||||
return("connection in wrong state");
|
||||
if (errno < 100)
|
||||
/* XXX soon UNIX errnos will catch up with FTP protocol errnos */
|
||||
return strerror(errno);
|
||||
for (k = 0; k < ftpErrListLength; k++)
|
||||
if (ftpErrList[k].num == errno)
|
||||
return(ftpErrList[k].string);
|
||||
|
Loading…
Reference in New Issue
Block a user