LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-05-2009, 04:26 PM   #1
Anduril07
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
Trying to modify read() system call


Hi all,

I'm in a Operating systems class and my final project is to modify the read() system call. Basically what I'm wanting to do is make a temporary array or buffer that copies whatever read() is "reading" in, and check it against a particular word or list of words. So for instance, if the system reads in the line "I am going to bomb this test" and my search word is "bomb" then it will catch that, and then print out a simple message to the kernel log.
My problem is that I don't understand the read system call very well, and I'm just not really sure how to do this. I'm looking at the function:
SYSCALL_DEFINE3(read, unsigned int, fd, char _user*, buf, size_t, count) that is defined in the read_write.c file under the /fs directory.

I'm using Ubuntu on a virtual machine within VMware if that makes any difference (it shouldn't but just incase), and I'm a complete newbie at linux. Never touched it until about a month ago when I added my own system call for my first project. If anyone has any ideas, thoughts, or comments they would be greatly appreciated! Just remember I'm not sure how well I'll be able to understand you at first...
 
Old 05-07-2009, 08:01 AM   #2
bhaslinux
Member
 
Registered: Oct 2003
Location: UnitedKingdom
Distribution: Debian Lenny
Posts: 351

Rep: Reputation: 47
Quote:
Originally Posted by Anduril07 View Post
I'm using Ubuntu on a virtual machine within VMware if that makes any difference (it shouldn't but just incase), and I'm a complete newbie at linux. Never touched it until about a month ago when I added my own system call for my first project. If anyone has any ideas, thoughts, or comments they would be greatly appreciated! Just remember I'm not sure how well I'll be able to understand you at first...
VMware is fine and I have done lots of development. The only thing is vmware is a bit heavey and bulky and
virtual emulators like QEMU will be more easy and powerful to use.

do shoot your questions on LQ to us and we would be glad to help ...
 
  


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
Problem using 'read' system call buckles Programming 6 05-10-2005 12:45 PM
Problem w/ 'read' system call - RH 7.3 buckles Linux - Newbie 3 05-07-2005 01:03 AM
look at how i modify the system call interrupt vector qqrilxk Programming 3 03-21-2005 02:13 AM
new system call, modify Makefile for .o feetyouwell Programming 0 11-16-2004 10:58 AM
maximum value of count in read system call udayan Programming 2 06-13-2002 07:51 AM


All times are GMT -5. The time now is 03:03 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration