Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2011 17:11:31 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225805 - head/usr.bin/fetch
Message-ID:  <201109271711.p8RHBVII032975@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Sep 27 17:11:31 2011
New Revision: 225805
URL: http://svn.freebsd.org/changeset/base/225805

Log:
  Use fseeko() instead of fseek().  The rest of the code is off_t-aware,
  but the use of fseek() means fetch(1) can't correctly resume a transfer
  that was interrupted past the 2 GB mark.
  
  Pointed out by:	ache@
  MFC after:	3 weeks

Modified:
  head/usr.bin/fetch/fetch.c

Modified: head/usr.bin/fetch/fetch.c
==============================================================================
--- head/usr.bin/fetch/fetch.c	Tue Sep 27 17:11:09 2011	(r225804)
+++ head/usr.bin/fetch/fetch.c	Tue Sep 27 17:11:31 2011	(r225805)
@@ -561,8 +561,8 @@ fetch(char *URL, const char *path)
 			}
 		}
 		/* seek to where we left off */
-		if (of != NULL && fseek(of, url->offset, SEEK_SET) != 0) {
-			warn("%s: fseek()", path);
+		if (of != NULL && fseeko(of, url->offset, SEEK_SET) != 0) {
+			warn("%s: fseeko()", path);
 			fclose(of);
 			of = NULL;
 			/* picked up again later */



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