[lkml]   [2003]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: patch for errno-issue (with soundcore)
On Mon, 13. Jan. 2003 17:33, Petr Vandrovec wrote:
> There is no problem currently, because of nobody uses errno value at
> all (in the firmware loader), it is just that inline functions generated
> by syscallX() store error codes into errno...
> Real problem is that firmware loader should use
> filp_open/vfs_read/filp_close (or sys_open/sys_llseek/sys_read/sys_close if
> you want to use fd interface, but filp_{open,close} and vfs_read are
> already exported for modules while sys_open/sys_llseek/sys_read are not).
> As an alternative, do_mod_firmware_load should be standalone userspace
> program executed through call_usermodehelper or something like that...
> Unfortunately we do not have an interface to distribute userspace binaries
> together with kernel (except initrd) yet, so it would require either
> adding do_mod_firmware_load into module-init-tools, or some simillar
> package required by 2.[56].x kernels.
> Also adding "#define errno (current()->exit_code)" at the beginning of
> sound_firmware.c (just below #define __KERNEL_SYSCALLS__) should do
> the trick, but I do not recommend taking this path.
> Best regards,
> Petr Vandrovec

First of all a big THANKS!

Now, at least, I understood the real problem...
'errno' is only needed because open(), close(), llseek() and read() are used,
which do a syscall and the return code is written to a variable called
'errno'. This is NOT the 'errno' variable defined in lib/errno.c... OK.

And so the real problem is using these functions and as we ARE in the kernel
mode we do not really need the kernel traps...

So after realizing the real problem I think I am not the right person to fix
it. But if you want I could try...

Sincerely yours
Thomas Schlichter
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.075 / U:3.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site