K 10 svn:author V 5 luigi K 8 svn:date V 27 2001-11-21T17:50:35.000000Z K 7 svn:log V 1306 Prevent panics when trying to kldunload a module which has been statically compiled in and previously attempted to load (this is a very common situation, because some programs e.g. ppp do try to load what they need). This is done by having module_register() pass up any error it should find. Not being familiar enough with the module handling code, i am not sure if this is the best fix to the problem -- after spending a bit of time on it I think there is some architectural problem in that part of the kernel, which (as Mike Smith pointed out) still confuses between "files" (loadable objects) and "modules" (subsystems available in the kernel, which can reside in loadable object or be statically compiled in). On the other hand the problem is sufficiently serious to deserve at least a short term fix, and this change is sufficiently small (6 lines in a single file) to be easily backed out and replaced with The Right Fix when/if this becomes available. For the above reason, and because some postings i read seem to suggest that the problem does not exist in current (though i couldn't verify/find how it is fixed there). I am only committing this to RELENG_4 and not to HEAD. For more details see PR kern/24392 and my message to -stable with Message-ID <20011105111839.A75789@iguana.aciri.org> END