Index: usr.bin/fetch/fetch.1 =================================================================== --- usr.bin/fetch/fetch.1 (revision 186168) +++ usr.bin/fetch/fetch.1 (working copy) @@ -253,6 +253,11 @@ The .Nm command returns zero on success, or one on failure. +If invoked with invalid parameters then +.Sy EX_USAGE Pq 64 +from +.Xr sysexits 3 +is returned. If multiple URLs are listed on the command line, .Nm will attempt to retrieve each one of them in turn, and will return Index: lib/libfetch/fetch.c =================================================================== --- lib/libfetch/fetch.c (revision 186168) +++ lib/libfetch/fetch.c (working copy) @@ -74,9 +74,6 @@ FILE * fetchXGet(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -110,9 +107,6 @@ FILE * fetchPut(struct url *URL, const char *flags) { - int direct; - - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchPutFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) @@ -132,9 +126,6 @@ int fetchStat(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -158,9 +149,6 @@ struct url_ent * fetchList(struct url *URL, const char *flags) { - int direct; - - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchListFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0)