From owner-freebsd-libh Wed Oct 10 13:48:41 2001 Delivered-To: freebsd-libh@freebsd.org Received: from mail12.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by hub.freebsd.org (Postfix) with ESMTP id 8F16A37B409 for ; Wed, 10 Oct 2001 13:48:32 -0700 (PDT) Received: (qmail 38411 invoked from network); 10 Oct 2001 20:48:31 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 10 Oct 2001 20:48:31 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011010160737.C1233@shall.anarcat.dyndns.org> Date: Wed, 10 Oct 2001 13:47:57 -0700 (PDT) From: John Baldwin To: The Anarcat Subject: Re: adding Disk::freespace to lib[h]disk Cc: freebsd-libh@freebsd.org, alex@big.endian.de, Jordan Hubbard Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 10-Oct-01 The Anarcat wrote: > Chocolate chip cookies, eh? > > What brand? :) > > Seriously, I don't think I could seriously take this challenge, as > libdisk is too messy to start from and I do not have enough knowledge of > these internals. I guess I could try to re-implement functions such as > Int_Open_Disk() in a separate (the low-level) library. It shouldn't be > too difficult, assuming the current *implementation* is correct (it's > the API that screwed in libdisk case, right?). > > I'll look at the libwhisk John mentionned, though. The API does need major work. Please do look at libwhisk rather than reinvent it. If you do choose to write your own, I would do it in C++. :) With a base class for a piece of a disk that disklabel partitions and MBR slices are built from (along with some kind of abstraction for a piece container that contains the list of containers, thus, a MBR slice would have in it a disklabel container that contained disklabel partitions), etc. Most of the work would be in the container classes. Hmm, actually, since the containers each have a fixed number of containee's, I would just use an abstraction for the containers that allows for nesting, and throw out the notion of a object for each piece, etc. > A. > > On Wed Oct 10, 2001 at 12:57:07PM -0700, Jordan Hubbard wrote: >> You're making perfect sense. We've long known that libdisk(3) needed >> to be taken out in back of the barn and shot through the head, but there's >> just been nobody around to do it so we're still stuck with that evil piece >> of.... code. The person who re-implements libdisk correctly will get >> a whole box of chocolate chip cookies in the mail from me. :) >> >> - Jordan -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message