On Monday 31 March 2008 11:50:12 Bernd Büttner wrote:
> Bongani Hlope schrieb:
> > On Monday 31 March 2008 11:04:13 Bernd Büttner wrote:
> >> Hi,
> >>
> >> I'm using distribution 20070130 on platform m68knommu.
> >> In my device driver that is loaded during startup, not compiled in, I
> >> must use sys_open, sys_close, sys_read, sys_write and sys_ioctl.
> >> sys_write and sys_ioctl are not exported.
> >>
> >> Is it ok to add following lines to m68k_ksyms.c:
> >>
> >>    #include <linux/syscalls.h>
> >>    EXPORT_SYMBOL(sys_write);
> >>    EXPORT_SYMBOL(sys_ioctl);
> >>
> >>
> >> or is there a better way to access these functions from kernel-mode
> >> drivers?
> >
> > Those are system calls, they don't need EXPORT_SYMBOL. There are some
> > kernel module that uses those, but since we don't know what error you are
> > getting it is hard to give a good answer.
>
> The driver is linked as module and the linker shows a warning:
>
> WARNING: "sys_write" [drivers/mkc/mkcext_4108.ko] undefined!
>
> exporting sys_write as described above eliminates the warning.

You really shouldn't be doing that in a module, that is why those symbols are 
not exported. But if you really insist on reading/writing a file in a kernel 
module look here: http://www.linuxjournal.com/article/8110 it has both the 
lengthy warning and examples of how to do it if you insist on doing 
the "wrong" thing




-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to