From owner-freebsd-current@FreeBSD.ORG Tue Oct 26 13:46:02 2010 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 32809106564A for ; Tue, 26 Oct 2010 13:46:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 041AC8FC12 for ; Tue, 26 Oct 2010 13:46:02 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id A33C346B2C; Tue, 26 Oct 2010 09:46:01 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 98EDF8A029; Tue, 26 Oct 2010 09:46:00 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org, d@delphij.net Date: Tue, 26 Oct 2010 09:26:54 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <4CC5D83E.8030505@delphij.net> In-Reply-To: <4CC5D83E.8030505@delphij.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201010260926.54430.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 26 Oct 2010 09:46:00 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Subject: Re: [RFC] More meaningful information about ENOEXEC for kldload(8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 13:46:02 -0000 On Monday, October 25, 2010 3:19:26 pm Xin LI wrote: > Hi, > > Here is a simple patch that adds more meaning messages when kldload hits > ENOEXEC. > > Before patch: > > kldload: can't load geom_eli.ko: Exec format error > > After patch: > > kldload: can't load geom_eli.ko: Exec format error > kldload: Dependendent kernel module cannot be loaded from kern.module_path? > > Comments? The reason I vote know is that ENOEXEC can mean several things. I thought you had a patch to catch the actual kernel error message and pass it back to userland. That would be a useful feature, but this message doesn't really help and can point people in the wrong direction if their error is due to a different problem. If you want to help the user, then I think a more useful approach would be to tell the user to check dmesg for error messages when kldload(2) fails with ENOEXEC. -- John Baldwin