Re: [RFC] More meaningful information about ENOEXEC for kldload(8)

From: John Baldwin <jhb_at_freebsd.org>
Date: Tue, 26 Oct 2010 09:26:54 -0400
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
Received on Tue Oct 26 2010 - 11:46:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:08 UTC