Date: Wed, 21 Jan 2009 03:14:17 -0800 (PST) From: Barney Cordoba <barney_cordoba@yahoo.com> To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= <des@des.no> Cc: freebsd-current@freebsd.org, Christof Schulze <christof.schulze@gmx.net> Subject: Re: kldload exec format error on amd64 freebsd-7.1-rc2 Message-ID: <419090.67820.qm@web63908.mail.re1.yahoo.com> In-Reply-To: <864oztrflu.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--- On Tue, 1/20/09, Dag-Erling Smørgrav <des@des.no> wrote: > From: Dag-Erling Smørgrav <des@des.no> > Subject: Re: kldload exec format error on amd64 freebsd-7.1-rc2 > To: barney_cordoba@yahoo.com > Cc: freebsd-current@freebsd.org, "Christof Schulze" <christof.schulze@gmx.net> > Date: Tuesday, January 20, 2009, 1:34 PM > Barney Cordoba <barney_cordoba@yahoo.com> writes: > > Is there any interest in fixing this stupid and wrong > error message to > > be something like "unresolved externals" at > some point? > > When the kernel fails to load a module, kldload(2) returns > ENOEXEC, > which strerror(3) translates to "exec format > error". If you can think > of a better errno value to use, feel free to send patches. > The only > alternatives I can think of are ENOSYS (ambiguous) and > EFTYPE (just as > vague as ENOEXEC). > > DES Have errnos reached MAXINT already? #define ENOREF 93 Or maybe some intelligent code, instead of just blindly calling warn(), since its just as likely an unresolved as it is a format error. I've patched mine to include "may have unresolved externals" so my customers have some idea that they might have a mismatched kernel. The best solution is a more specific error. I'm not quite sure why BSD developers are so frugal with errnos, but there must be a secret reason for it. Nobody really cares if yacc returns EINVAL for every error, but functionally visible binaries like kldload, which non-programmer users will encounter regularly, should have less cryptic error messages if possible. kldload is what, 11 years old now? Its time. Barney
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?419090.67820.qm>
