On Thursday, October 21, 2010 3:08:12 pm Xin LI wrote: > On 10/21/10 04:46, John Baldwin wrote: > > On Thursday, October 21, 2010 4:57:25 am Xin LI wrote: > >> Author: delphij > >> Date: Thu Oct 21 08:57:25 2010 > >> New Revision: 214125 > >> URL: http://svn.freebsd.org/changeset/base/214125 > >> > >> Log: > >> In syscall_module_handler(): all switch branches return, remove > >> unreached code as pointed out in a Chinese forum [1]. > >> > >> [1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619 > >> > >> Pointed out by: btw616 <btw s qq com> > >> MFC after: 1 month > > > > I think this exposes a bug though in that the default case doesn't pass > > through to chainevh. The default case should look more like the removed code > > (except returning EOPNOTSUPP instead of 0 if there is no chainevh). > > Hmm... It sounds reasonable in theory (so that modules can handle > events other than MOD_LOAD/UNLOAD) at least, while I don't think it's > really being used anywhere.
Yes, I agree it probably isn't used, but it'd be a weird surprise if someone tried to make use of it in the future for MOD_QUIESCE or the like. > Will the attached patch look reasonable? (If data->chainevh is NULL > then operation is not supported, if not then delegate to the module). Yes, I think this is fine. -- John Baldwin _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
