Re: Received Warnings and errors while compiling the Fedora Linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

you can not call open/close/write functions from kernel. I suggest you write data throught sysfs and then read these data by user land program.

martin

Irfan Ahmed  wrote / napísal(a):
I am using Fedora Linux 2.6.18. I have updated file ~/linux-2.6.18.2/net/ipv6/tcp_ipv6.c file. I am working on a project and at first stage, I need to write the ipsec decrypted packets to disk.
For this reason, I have embeded the following code in "tcp_v6_rcv" function.
    file_desc = open('/testlog.txt',O_WRONLY|O_APPEND);
file_write_status = write(file_desc,skb->data,skb->len); close(file_desc);

When I compiling the kernel, I received the following warnings and errors
------------------------------------------tcp_ipv6.c---------------------------------------------------------------
[root@localhost linux-2.6.18.2]# make modules
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC [M]  net/ipv6/tcp_ipv6.o
net/ipv6/tcp_ipv6.c: In function ‘tcp_v6_rcv’:
net/ipv6/tcp_ipv6.c:1224: warning: implicit declaration of function ‘open’
net/ipv6/tcp_ipv6.c:1224:19: warning: character constant too long for its type
net/ipv6/tcp_ipv6.c:1225: warning: implicit declaration of function ‘write’
net/ipv6/tcp_ipv6.c:1226: warning: implicit declaration of function ‘close’
  LD [M]  net/ipv6/ipv6.o
  Building modules, stage 2.
  MODPOST
WARNING: drivers/atm/he.o - Section mismatch: reference to .init.text: from .text between 'he_start' (at offset 0x2074) and 'he_service_tbrq'
WARNING: "close" [net/ipv6/ipv6.ko] undefined!
WARNING: "open" [net/ipv6/ipv6.ko] undefined!
WARNING: "write" [net/ipv6/ipv6.ko] undefined!
  CC      net/ipv6/ipv6.mod.o
  LD [M]  net/ipv6/ipv6.ko
------------------------------------------------------------------------------------------------------------------------------------------------

Any one has any idea about it to solve the warnings.

Regards,

Send instant messages to your online friends http://uk.messenger.yahoo.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux