Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2001 02:16:16 +0300 (MSK)
From:      .@babolo.ru
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/24977: fetch: noice in quiet mode (fix)
Message-ID:  <200102092316.CAA13564@aaz.links.ru>

next in thread | raw e-mail | index | archive | help

>Number:         24977
>Category:       bin
>Synopsis:       fetch issues warning in quiet mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 09 15:20:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Aleksandr A. Babaylov
>Release:        FreeBSD 4.2-STABLE
>Organization:
home
>Environment:
This bug was introduced something beetween 4.2-RELEASE and 2001 Jan 16

>Description:
Example:

0grimble~(9)>fetch -q -o - http://www.rbc.ru/ > /dev/null
fetch: -: size of remote file is not known

This is not desirable in scripts

>How-To-Repeat:
See example above

>Fix:
--- usr.bin/fetch/fetch.c	Wed Dec 27 19:42:09 2000
+++ usr.bin/fetch/fetch.c	Sat Feb 10 01:56:06 2001
@@ -305,8 +305,6 @@
 	goto success;
     }
 
-    if (us.size == -1)
-	warnx("%s: size of remote file is not known", path);
     if (v_level > 1) {
 	if (sb.st_size != -1)
 	    fprintf(stderr, "local size / mtime: %lld / %ld\n",
@@ -314,6 +312,8 @@
 	if (us.size != -1)
 	    fprintf(stderr, "remote size / mtime: %lld / %ld\n",
 		    us.size, us.mtime);
+	else
+	    warnx("%s: size of remote file is not known", path);
     }
     
     /* open output file */


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102092316.CAA13564>