Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jun 2002 05:37:47 -0700
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        audit@FreeBSD.ORG, current@FreeBSD.ORG
Cc:        Poul-Henning Kamp <phk@FreeBSD.ORG>, Kirk McKusick <mckusick@FreeBSD.ORG>
Subject:   libufs, a library for dealing with UFS from userland.
Message-ID:  <20020629053747.A68232@FreeBSD.ORG>

next in thread | raw e-mail | index | archive | help
Hi,

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:
	http://people.freebsd.org/~jmallett/libufs.shar

And here's diffs to dumpfs and tunefs:
	http://people.freebsd.org/~jmallett/libufs-dumpfs.diff
	http://people.freebsd.org/~jmallett/libufs-tunefs.diff

To build (e.g. tunefs) with libufs, do something like:
	cd libufs
	make
	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 :)

Thanks,
juli.
-- 
Juli Mallett <jmallett@FreeBSD.org>       | FreeBSD: The Power To Serve
Taking over the FreeBSD negaverse.        | FreeBSD Negacore Team
Will break world for fulltime employment. | finger jmallett@FreeBSD.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020629053747.A68232>