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=F8rgrav <des@des.no> wrote: > From: Dag-Erling Sm=F8rgrav <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? >=20 > 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.=20 > The only > alternatives I can think of are ENOSYS (ambiguous) and > EFTYPE (just as > vague as ENOEXEC). >=20 > DES Have errnos reached MAXINT already? #define ENOREF 93 Or maybe some intelligent code, instead of just blindly calling warn(), sin= ce its just as likely an unresolved as it is a format error. I've patched mine to include "may have unresolved externals" so my customer= s have some idea that they might have a mismatched kernel. The=20 best solution is a more specific error. I'm not quite sure why BSD develop= ers are so frugal with errnos, but there must be a secret reason for it. No= body really cares if yacc returns EINVAL for every error, but functionally = visible binaries like kldload, which non-programmer users will encounter re= gularly, should have less cryptic error messages if possible.=20 kldload is what, 11 years old now? Its time. Barney=0A=0A=0A
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?419090.67820.qm>