I'm trying to get review of something phk@ talked me into having a go at,
libufs, which is a library to un-duplicate code for dealing with UFS on a
raw disk device.  Currently it defines a generic structure for UFS on any
disk that one might want to refer to from the userland, including the UFS
superblock, version, and the name and file descriptor for the device used
to work with the disk.  That structure is then used by implementations of
block read/write (bread/bwrite), functions to read and write the superblock
in a uufsd structure (sbread/sbwrite) and a function to get the inode
structure for a given file.

Here's a shell archive:

And here's diffs to dumpfs and tunefs:

To build (e.g. tunefs) with libufs, do something like:
        cd libufs
        co /home/ncvs/src/sbin/tunefs.c,v
        cc tunefs.c -o libufs-tunefs -L. -lufs

I get identical output from dumpfs and libufs-dumpfs currently and I can
toggle softdep flags fine with tunefs.  I'd like to commit this by the
coming Tuesday as I will be out of town from Tuesday morning and will not
have any way to further work on this, etc.

Further functionality may/will be added to libufs, however this is a good
"milestone" of abstraction, in my opinion, as it can replace code in a number
of utilities, namely dump, dumpfs, tunefs, ffsinfo, growfs, and possibly one
or two others, if I recall correctly.

Architectural review, comments, and "feel free to commit" welcome :)

Juli Mallett <[EMAIL PROTECTED]>       | FreeBSD: The Power To Serve
Taking over the FreeBSD negaverse.        | FreeBSD Negacore Team
Will break world for fulltime employment. | finger [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to