LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-21-2009, 05:30 PM   #1
ranthal
LQ Newbie
 
Registered: Jun 2009
Location: Carlsbad, CA
Posts: 24

Rep: Reputation: 15
Sequence Files for drivers


Hey all,

I'm working on a driver right now that makes use of sequence files. I seem to have all the functions I need to implement for the fops working correctly. So I loaded the driver and fooled around with it and it looked okay.

The only problem is that after I removed the driver the seq_release didn't work the way I expected. After removal the file remained in /proc and I would like it to be removed. Further, when I ran cat on the file it caused a seg fault.

What does seq_release do and why is it causing this seg fault? Any fixes?

Thx
 
Old 09-21-2009, 07:17 PM   #2
ranthal
LQ Newbie
 
Registered: Jun 2009
Location: Carlsbad, CA
Posts: 24

Original Poster
Rep: Reputation: 15
Solved

Alright, I figured it out. The source for seq_file was incomplete, since it was a very commonly used reference for drivers here's the full story...

The source mentioned that putting a call to create_proc_entry in the init function of the driver was the only necessary step to use it as a proc file. This is however incorrect in that this is insufficient. In the exit function there should be a call to remove_proc_entry as well.

Pretty simple solution as long as you know how to navigate the kernel source
 
  


Reply



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
In KDE 3.2, sequence for downloading files? Sione Linux - Newbie 2 05-19-2009 04:24 AM
using drivers from c files tkmsr Linux - Hardware 4 10-22-2007 01:05 PM
how would I list a sequence of files as "seq.$F4.ext : 1-100" BrianK Programming 0 07-12-2004 07:43 PM
header files and nvidia drivers Zoko Linux - Software 5 05-29-2004 06:39 PM
What is the sequence of files Debian used to determine the default wm? davidas Debian 6 04-06-2004 09:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:51 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
Open Source Consulting | Domain Registration