Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev
Date: Thu, 6 Nov 2014 01:54:12 +0900
From: Masao Uebayashi <uebayasi%gmail.com@localhost>
For future reference:
I think any "xxxbus" interface attribute (aka bus) should provide
xxxbusprint (and xxxbussubmatch if multiple children). I'll probably
change config(1) to extend cfiattrdata like:
struct cfiattrdata {
const char *ci_name;
cfprint_t ci_print;
cfsubmatch_t ci_submatch;
int ci_loclen;
const struct cflocdesc ci_locdesc[];
};
Then config_found*() can omit print/submatch args.
If the found child is known (e.g., "pcibus" creating "pci"):
config_found(self, "xxxbus");
Why use a string-keyed table with run-time lookups instead of a C
object with a C declaration?
/* ioconf.h */
extern struct cfiattrdata xxxbus;
/* xxx.c */
config_found(self, &xxxbus);
Home |
Main Index |
Thread Index |
Old Index