From owner-freebsd-current@FreeBSD.ORG Wed Jan 21 11:14:18 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 609FE1065730 for ; Wed, 21 Jan 2009 11:14:18 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63908.mail.re1.yahoo.com (web63908.mail.re1.yahoo.com [69.147.97.123]) by mx1.freebsd.org (Postfix) with SMTP id 02B008FC16 for ; Wed, 21 Jan 2009 11:14:17 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 68231 invoked by uid 60001); 21 Jan 2009 11:14:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=zEAWt/ghGz/h7L25MdZm2k7gv8B1jdIVA76rmCvQn3GhKE8koDXX4lVROkOx4QR9NqjVkaG0b6xXGVZEr61NHRs2YsznZXVwQ3VJJY7X5fMkx+aUbL9ar8s1nRre2AKLxdeXUbp8GG4QhsFWZq6ThIF0JHbC+NCG/UXn+igWiPw=; X-YMail-OSG: 9t.uUXUVM1mVWDcc37vsgtl8yk8t4cg_wZBrEgOe3bDLqdKt67JAsfTakmbjrpfzGWUXJu8Pjos6N6icWCNMQOkIMy.BMWLTlOzDgOr9h4pcLDUQ0gVDnTsnlnn9urXGRI3zVyK5YbPf7VBC_SZV5_gZvgVTqlFHnndbSs_15mrfZvOc0tfEw51cwQpXXdI.RbSOqgiUGU1MObLCVYUgHExuwg-- Received: from [98.242.222.229] by web63908.mail.re1.yahoo.com via HTTP; Wed, 21 Jan 2009 03:14:17 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Wed, 21 Jan 2009 03:14:17 -0800 (PST) From: Barney Cordoba To: =?iso-8859-1?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <864oztrflu.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <419090.67820.qm@web63908.mail.re1.yahoo.com> Cc: freebsd-current@freebsd.org, Christof Schulze Subject: Re: kldload exec format error on amd64 freebsd-7.1-rc2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: barney_cordoba@yahoo.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 11:14:21 -0000 --- On Tue, 1/20/09, Dag-Erling Sm=F8rgrav wrote: > From: Dag-Erling Sm=F8rgrav > Subject: Re: kldload exec format error on amd64 freebsd-7.1-rc2 > To: barney_cordoba@yahoo.com > Cc: freebsd-current@freebsd.org, "Christof Schulze" > Date: Tuesday, January 20, 2009, 1:34 PM > Barney Cordoba 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