bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libparted and libstore


From: Roland McGrath
Subject: Re: libparted and libstore
Date: Mon, 26 Mar 2001 18:11:44 -0500 (EST)

> Roland, as you have suggested, I have taken a look at using libparted
> in libstore.  This seems reasonable to do, however, it has two main
> drawback: it is huge, which is to say, we want to read a partition table
> (libparted does a lot of checks) and we do not really care about creating
> other partitions nor creating and checking filesystems.  Second, we want
> to blindly read partition tables.  Parted likes to fail if it finds any
> kind of error.

Well, I would hope that the library's interfaces would be clean and
flexible enough, or that the authors would be amenable to making them so.
A good library interface would provide simple functions to do just that
parts that a particular program wants, without bringing in a lot of
unnecessary code from the library.  

> Thus, it might be reasonable to ask the Parted developers to create
> a mini library, e.g. libpartread, which contains the desired
> functionality.

Well, the reason I was in favor of using Parted was to have a single clean
code base for the partition reading, and preferably to use Zthe canonical
sanctioned GNU thing if technical concerns permit.  If it turns out Parted
is not now a source of library code of sufficiently general utility, and is
not soon going to be, then maybe something else is the clean choice.  If
the Parted folks can provide the small and clean library we need in some
form or other that they will maintain well, whether or not it shares the
core code with the fancier version as one would think a clean
implementation would, that is dandy.  If you wind up deciding Parted is
hopelessly hairy and trying to come up with something else, the oskit's
diskpart library is simple and might be adequate (or at least a starting
point).  That's what's used in oskit-mach.

For libstore, as you say we need just simple and forgiving code to read
partition tables enough to locate a specified partition (or gracefully
report that it can't find it).  I will only be happy with code that is
clean, robust, and small.

The over-fanciness of Parted's library might be completely appropriate to
use in a "partitionfs" as we have discussed before.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]