Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 21:32:23 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        mjacob@feral.com
Cc:        arch@FreeBSD.ORG
Subject:   Re: lossage of a sort with using device hints... 
Message-ID:  <200103010432.f214WNd45265@harmony.village.org>
In-Reply-To: Your message of "Wed, 28 Feb 2001 10:13:08 PST." <Pine.LNX.4.21.0102281011140.3645-100000@zeppo.feral.com> 
References:  <Pine.LNX.4.21.0102281011140.3645-100000@zeppo.feral.com>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.LNX.4.21.0102281011140.3645-100000@zeppo.feral.com> Matthew Jacob writes:
: /*
:  * Resources from config(8).
:  */
: typedef enum {
:     RES_INT, RES_STRING, RES_LONG
: } resource_type;
: 
: 
: 
: But I've been happily using a getenv_quad for a 64 bit WWN override.
: 
: It strikes me that RES_INT and RES_LONG are too vague (as well as useless).
: How hard would it be to change these to RES_INT32 and RES_INT64?

I think this is a great idea, in theory, and will take a look at
changing them in the affacted places.  I'll let you know how hard it
turns out to be.

Also, in my original "hints" implementation, numbers had to be
preceeded by a # sign.  I'll see what can be done to preserve values
here.  It might make sense to grab all numbers as 64 bit quantities
with strtoll[u].  Or maybe it makes sense to just store everything as
a string and have the resource_*_value function tease a meaning out of
the string when called.  There's not a performance hit for doing that
since most values are querried only once or twice...

Warner

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




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