Christopher Horne writes: > For maximum flexibility, it is best if a driver does not have > compiled-in knowledge of its own name. Existing
What does "maximum flexibility" mean here? Under what normal conditions would a driver need to be installed under different names ... ? I guess I have nothing against the interface -- it seems obvious enough in design -- but the usage seems pretty obscure. > information. The ddi_modname() interface was added in s10_59 > as part of CR5033382 "sd driver should not depend on hard-coded > driver name". That shows a debug example, where (I'd guess) someone could just as easily recompile with a new name. Are there other cases where renaming on the fly makes sense? > + char *mod_modname(struct modlinkage *modlinkage); Code review nit: I suggest 'const char *' as a return value here (and perhaps a const argument as well). The string this returns shouldn't normally be modified by a user. (And if it is ...) -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
