LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 01-26-2005, 12:23 PM   #1
dypgrp
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"

2>***VERY IMPORTANT QUESTION******
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
dypgrp
 
Old 01-26-2005, 02:09 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

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


Reply


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 02:54 AM
cannot find map file. No module symbols loaded - kernel modules not enabled. jjorloff1 Linux - Software 3 01-06-2005 12:02 PM
Kernel file system modules not found JohnKFT Slackware 2 04-07-2004 07:00 PM
Kernel Modules and modules.conf init Linux - General 0 02-20-2004 07:51 PM
Slack9 - no PPP (can't open dependencies file /lib/modules/2.4.18/modules.dep) bluehz Slackware 1 05-04-2003 03:32 PM


All times are GMT -5. The time now is 07:04 AM.

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