?
To: Quentin Garnier <cube@cubidou.net>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-kern
Date: 03/17/2007 09:27:36
On Sat, 17 Mar 2007, Quentin Garnier wrote:
> The thing you're missing is that attributes are not something the user
> always sees. E.g., ep* at isa? brings in attribute ep_isa and ep. If
> you want debug for the ISA attachment, it's different from debug for the
> rest of the driver. Yes, it's far fetched, but there are probably
> better examples of the issue.
No, thats true - its one of the details that may need to be glossed over
in some way (though, since this is a DEBUG mechanism, I don't see why a
few sharp corners can not be tolerated)
> Well, I don't really understand why you're reluctant to change files.*.
Well I was on a different track and didn't see a need.. taking your
example for instance, we have:
attach ep at isa with ep_isa: elink
file dev/isa/if_ep_isa.c ep_isa
attach ep at isapnp with ep_isapnp
file dev/isapnp/if_ep_isapnp.c ep_isapnp
attach ep at eisa with ep_eisa
file dev/eisa/if_ep_eisa.c ep_eisa
what would you propose we need to add to that, in order to make fine
grained debug output of ep(4) easily accessible?
While I think that improving 'options DEBUG' is a worthy goal (possibly
better than my initial proposal :), I'm still not seeing any need to
twiddle the files.* defs to enable it.. if the knobs were to be sysctl
knobs, then we could already use any of the following namespaces:
debug.dev.isa.if_ep_isa
debug.dev.isapnp.if_ep_isapnp
debug.dev.eisa.if_ep_eisa
(or, because file names are unique)
debug.if_ep_isa
debug.if_ep_isapnp
debug.if_ep_eisa
(or simply)
debug.ep
(or just using the attribute)
debug.ep_isa
debug.ep_isapnp
debug.ep_eisa
without adding anything but some config(1) magic to generate a source
file containing the knobs?
iain