From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BelsM-0005I1-Ld for qemu-devel@nongnu.org; Sun, 27 Jun 2004 22:28:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BelsL-0005Hp-1H for qemu-devel@nongnu.org; Sun, 27 Jun 2004 22:28:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BelsK-0005Hm-Tu for qemu-devel@nongnu.org; Sun, 27 Jun 2004 22:28:04 -0400 Received: from [38.113.3.51] (helo=snickers.hotpop.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Belqg-00037R-Vx for qemu-devel@nongnu.org; Sun, 27 Jun 2004 22:26:23 -0400 Received: from phreaker.net (kubrick.hotpop.com [38.113.3.103]) by snickers.hotpop.com (Postfix) with SMTP id D52C97101A for ; Mon, 28 Jun 2004 01:22:52 +0000 (UTC) Received: from jbrown.mylinuxbox.org (pcp03144805pcs.midval01.tn.comcast.net [68.59.228.236]) by smtp-3.hotpop.com (Postfix) with ESMTP id 528ACFC5F97 for ; Mon, 28 Jun 2004 02:09:21 +0000 (UTC) Date: Sun, 27 Jun 2004 22:23:20 -0400 From: "Jim C. Brown" Subject: Re: [Qemu-devel] Re: replies Message-ID: <20040628022320.GA3436@jbrown.mylinuxbox.org> References: <20040626184535.GA19123@jbrown.mylinuxbox.org> <200406271007.11404.a_mulyadi@telkom.net> <20040627050111.GA24787@jbrown.mylinuxbox.org> <200406271412.07258.a_mulyadi@telkom.net> <20040627182613.GA308@jbrown.mylinuxbox.org> <40DF7499.8070802@tusker.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40DF7499.8070802@tusker.org> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Jun 28, 2004 at 09:30:01AM +0800, Damien Mascord wrote: > Hi guys, > > Because it is possible that > a new version of fdisk will change it's screen output and "wreck" > lomount... That's the problem that we have here. Though it would be a trivial fix, it is still rather inconvient to have to update lomount everytime a new vesrsion comes out. > Excuse my ignorance, but would there be an fdisk library that you could > just call the functions, or even duplicate the functionality that you > need from fdisk into a binary of your own ? Right now, lomount is basicly a wrapper. (I originally meant to write it as a shell script in fact, but I couldn't figure out how to parse fdisk's output. Right now that is what I'm trying to do (using awk for the actual parsing).) The Right Thing(tm) to do would be to replace the code that parses fdisk's output with code ripped from fdisk, qemu, or even to use libparted.so, and use that code to read the disk image and calculate the values that we need. (We can go futher and have lomount make the mount(2) call by itself instead of merely calling mount(8), if we wanted to.) This is not a trivial change. But it would certainly be worthwhile. > > Damien > -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.