Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2001 23:17:22 +0200
From:      Thomas Moestl <tmoestl@gmx.net>
To:        freebsd-hackers@freebsd.org
Cc:        "Kenneth D . Merry" <ken@FreeBSD.org>
Subject:   libdevstat interface changes
Message-ID:  <20010718231722.A5026@crow.dom2ip.de>

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

I want to add support for reading crash dumps to libdevstat. This will
allow iostat and vmstat to fully work on crashdumps (with some
additional patches).
To give this a reasonable interface, a kvm handle needs to be passed
to getnumdevs, getgeneration, getversion, checkversion and getdevs.
A NULL argument will cause the old behaviour (sysctls will be used to
get the data).
Additionally, programs that link with libkdevstat will need to link
against libkvm.
Because of that, the library version number will need to be bumped.
While we are doing that, Kenneth and I think that the library
function names should all get a descriptive prefix ("devstat_"), so
that devstat library calls can easily be recognized in the sources.

Compatability functions will be provided under the old names.
Because the interface of the library is relatively small, this will
hopefully not add much overhead. The old interface will be marked as
deprecated and may be removed some day.
A library dependency to libkvm will be added, so that dynamically
linked executables can use the new library without having to
explicitely link to libkvm.
This way, we should hopefully be able to avoid breakage of
libdevstat-using programs outside of src/ (there are some in the
ports, for example).

Does anyone spot style or interface issues or compatability pitfalls
with this that I have overlooked? If not, this will probably be
committed relatively soon together with the new functions that Kenneth
has posted on -audit. 

Thanks,
	- thomas

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




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