Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-26-2005, 11:23 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 11

Rep: Reputation: 0
unlinking a file in kernel modules + doubts

We need help in linux kernel programming.

Following r the problems that we have encountered:

1> When we use '%' and '/' operators we get an error while inserting the module like:

"Unresolved symbol _udivdi3 and _umoddi3 "

but the ambiguity lies in the fact tht '/' operator works at some places w/o
any error.We have also tried including "fdiv" functions from "math-emu"
directory but still it gives error like "Unresolved symbol fdiv"

the system call "access" doesnt work at kernel level so we used "sys_access" ,
and for tht we included the necessary header file "fs/open.c" still it gave
the "unresolved symbol error" so to remove the error we included the
entire code of sys_access defined in fs/open.c in our code

similarly for "rename" we included the code of "do_rename" in our source code
But its just not a good idea of including the codes of system calls in our code
,caus we had no other alternative so we had to include the code for these syscalls
Is any other solution for it.

3>we didnt find a kernel level substitute for system call "opendir" and "dirfd"
We tried including "dirent.h" file but while compiling it gives parse errors.

********VERY IMP************
4> "sys_unlink" is kernel equivalent for "unlink" again we had to
include the file "fs/namei.c" but it gave error like "redefination in structure in dnotify.h"
and sometimes it gave error like::
syntax error before "_export_objs_in_the_Makefile" so we thought of making changes in makefile.
But that too didnt work or may be we were wrong.

Please do reply to our querries as soon as possible.
And Thanks.
Waiting for ur reply.
Bye take care
Old 01-26-2005, 01:09 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
This is all VERY bad and bug-prone programming practices. I strongly suggest reading some documentation on System-level programming for unix.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel compilation: few doubts regarding the various kernels b0nd Linux - Newbie 1 08-15-2005 01:54 AM
cannot find map file. No module symbols loaded - kernel modules not enabled. jjorloff1 Linux - Software 3 01-06-2005 11:02 AM
Kernel file system modules not found JohnKFT Slackware 2 04-07-2004 06:00 PM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 06:51 PM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 02:32 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration