Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Apr 2001 12:31:56 +0200 (CEST)
From:      Andrzej Bialecki <abial@webgiro.com>
To:        Graham Wheeler <gram@cequrux.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Getting ISA device settings from kernel
Message-ID:  <Pine.BSF.4.20.0104031230210.82545-100000@mx.webgiro.com>
In-Reply-To: <3AC4A5C9.35FE775B@cequrux.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 30 Mar 2001, Graham Wheeler wrote:

> Hi all
> 
> I had some code that worked on FreeBSD 3.4 to configure ISA devices.
> In order to get the ISA device settings, I used the kvm library, and
> started off by extracting the name lists for _isa_devtab_tty, 
> _isa_devtab_bio, and _isa_devtab_net.
> 
> I used to just give up if kvm_nlist returned a non-zero number. On
> FreeBSD 4.2 this is happening. Checking the manpage, I see that this
> could be that there are invalid values, so I changed the check to 
> only give up of the return value is negative. The code now gets past the
> kvm_nlist, but fails on the first kvm_read that follows (which uses the
> n_value returned by kvm_nlist as the offset field).
> 
> Is there a different mechanism in 4.2 to do the kind of stuff I'm 
> trying to do? Should the code still work?

libkvm is being gradually deprecated - you don't have to use it to do what
you want. Please take a look at the code in src/sbin/kget - it does
something very similar.

Andrzej

// ----------------------------------------------------------------
// Andrzej Bialecki <abial@webgiro.com>, Chief System Architect
// WebGiro AB, Sweden (http://www.webgiro.com)
// ----------------------------------------------------------------
// <abial@freebsd.org> FreeBSD developer (http://www.freebsd.org)



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?Pine.BSF.4.20.0104031230210.82545-100000>