Date: Wed, 12 Jul 2000 00:18:47 -0600 From: Warner Losh <imp@village.org> To: Mike Smith <msmith@FreeBSD.ORG> Cc: "Gary T. Corcoran" <gcorcoran@lucent.com>, FreeBSD Hackers <freebsd-hackers@FreeBSD.ORG> Subject: Re: Module parameters? Message-ID: <200007120618.AAA11600@harmony.village.org> In-Reply-To: Your message of "Tue, 11 Jul 2000 23:14:10 PDT." <200007120614.XAA00651@mass.osd.bsdi.com> References: <200007120614.XAA00651@mass.osd.bsdi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <200007120614.XAA00651@mass.osd.bsdi.com> Mike Smith writes: : > Something like the following? I know that there's more routines that : > need to be written. parse_int, parse_string, parse_bool, parse_enum : > should be enough. : > : > Comments? : : Reuse the parsers in ng_parse.c, or (IMO better) use sscanf format : strings (which are *extremely* flexible). sscanf doesn't do enum strings. sscanf is inadequate in many other ways as well. The ng_parse stuff is a little different than the what I had in mind, but it looks like it might be useful. I have concerns about the ng_parse_type being too heavy weight for what I want to do. It maintains an offset in a long stream of data, and I'm just wanting to parse one thing. It seems a lot simpler and useful. Also, netgraph isn't required and I'd like to have something that is light weight enough to be included always. Warner 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?200007120618.AAA11600>