From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 15 19:57:13 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A3083BF9 for ; Tue, 15 Oct 2013 19:57:13 +0000 (UTC) (envelope-from mah@jump-ing.de) Received: from mail.ud03.udmedia.de (ud03.udmedia.de [194.117.254.43]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 168722403 for ; Tue, 15 Oct 2013 19:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=mail.ud03.udmedia.de; h= in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to; s=beta; bh=uzvk ZjpOaTID1Oolnxp6l/PUQfPocZYbdl6hR+CAkzE=; b=P7DbjfPEWNOxxCYiOz51 8IJLapD3TkjopThKGFvUzz2ze5lTZ0e0dzmTOOMyZkivr0DLMbZK7oooCa6uwMJq Lyh2NEEaY7hFfJBo5qDW/if86KtXYOo/458VQutC+m16ykygwbYpbVE59zWJkR7Z K8CKeVT8aeeO5aJ+D5Yp3UM= Received: (qmail 32451 invoked from network); 15 Oct 2013 21:50:29 +0200 Received: from unknown (HELO ?10.0.0.50?) (ud03?291p1@37.209.86.56) by mail.ud03.udmedia.de with ESMTPA; 15 Oct 2013 21:50:29 +0200 In-Reply-To: <1381853252.2682.0.camel@localhost> References: <1380730546.1619.47.camel@localhost> <1381853252.2682.0.camel@localhost> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <06526D03-28F4-4086-A82D-386A8C1AECF9@jump-ing.de> Content-Transfer-Encoding: 7bit From: Markus Hitter Subject: Re: makefs(8) proposed changes [repost from fs@] Date: Tue, 15 Oct 2013 21:51:48 +0200 To: sbruno@freebsd.org X-Mailer: Apple Mail (2.753.1) Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2013 19:57:13 -0000 Am 15.10.2013 um 18:07 schrieb Sean Bruno: > Index: ffs.c > =================================================================== > --- ffs.c (revision 255871) > +++ ffs.c (working copy) > @@ -470,6 +470,7 @@ > char *buf; > int i, bufsize; > off_t bufrem; > + char temp_buf[16*512]; > > assert (image != NULL); > assert (fsopts != NULL); > @@ -480,6 +481,7 @@ > warn("Can't open `%s' for writing", image); > return (-1); > } > + read(fsopts->fd, temp_buf, 16*512); > > /* zero image */ > #if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS Usually I'm only an observer here, but what's the point of reading 8 kB without using them? There's also lseek(2). Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. (FH) Markus Hitter http://www.jump-ing.de/