From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 30 16:39:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 968B616A4CE for ; Thu, 30 Dec 2004 16:39:26 +0000 (GMT) Received: from www.portaone.com (web.portaone.com [195.70.151.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E99443D1D for ; Thu, 30 Dec 2004 16:39:25 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.73] (portacare.portaone.com [195.140.247.242]) (authenticated bits=0) by www.portaone.com (8.12.11/8.12.11) with ESMTP id iBUF8Imj027066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Dec 2004 16:08:20 +0100 (CET) (envelope-from sobomax@portaone.com) Message-ID: <41D419DA.4050603@portaone.com> Date: Thu, 30 Dec 2004 17:08:10 +0200 From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Pentchev References: <1104358540.2895.10.camel@kaiser.sig11.org> <20041230103433.GB830@straylight.m.ringlet.net> <1104409708.6657.1.camel@kaiser.sig11.org> <20041230123116.GE830@straylight.m.ringlet.net> <41D4036B.1060600@portaone.com> <20041230140007.GH830@straylight.m.ringlet.net> <41D40EA0.2060009@portaone.com> <20041230145543.GJ830@straylight.m.ringlet.net> <20041230145949.GK830@straylight.m.ringlet.net> In-Reply-To: <20041230145949.GK830@straylight.m.ringlet.net> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.80/589/Wed Nov 17 13:38:41 2004 clamav-milter version 0.80j on www.portaone.com X-Virus-Status: Clean X-Mailman-Approved-At: Thu, 30 Dec 2004 16:44:27 +0000 cc: freebsd-hackers@FreeBSD.ORG cc: Matteo Riondato Subject: Re: Creating Compressed Loop FS from stdin X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 16:39:26 -0000 Never mind - people are inheretedly error prone creatures. ;-) In your case shell has been passing file descriptor of the open file, not pipe, so that seeking has been working properly. Anyway, I think that your patch is useful, since it should allow using disk devices. -Maxim Peter Pentchev wrote: > On Thu, Dec 30, 2004 at 04:55:43PM +0200, Peter Pentchev wrote: > >>On Thu, Dec 30, 2004 at 04:20:16PM +0200, Maxim Sobolev wrote: >> >>>You don't check return code of the second lseek - I bet it fails. This >>>probably leads to creation of seemingly valid loop fs (i.e. with valid >>>header), but filled with zeroes or some random junk. >> >>I said I'd tested it before posting it the first time. It works. >>It creates a valid loop fs, containing exactly the files that are in >>the input ISO image. > > > Errr. Oops. > > Sorry everyone - the patch does not really work. I keep testing it with > a *file* passed on mkuzip's stdin, all the while feeling surprised that > lseek() works on the pipe... when there is no pipe at all :( > > I just tested it with a real pipe, and of course, it failed. Again, > sorry for wasting your time; I guess it'd be best if I tucked in for > the holidays now :( > > G'luck, > Peter >