LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-19-2005, 09:09 AM   #1
gan_04
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Regarding Char Drivers


Hi,
I am new to device drivers. I need some help regarding how to hack the entry points of the 'st' driver dynamically. I saw that in Solaris, it is done like the one below :

/* Save the original pointers of the st driver */
st_ghost_cb_ops =
*((devopsp[ddi_name_to_major("st")])->devo_cb_ops);

(devopsp[ddi_name_to_major("st")])->devo_cb_ops->cb_open
= my_st_open; /* My driver function call */

I would like to know if there is any equivalent of devopsp in linux ie is there any way to retrieve the original file operations structure of the st driver dynamically and to over write with my own file operation structure.

I saw that all the registered character devices are added into an chrdevs[] array. As this array defined as static, I think I cant access it. Pls let me know is there is a way to access this array or the fops structure corresponding to 'st' driver can be retrieved.(I saw get_chrfops() function but again it is declared as static)

Thanks,
Gan
 
  


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
C pointers confusion - char ** = char [][] ?? saravkrish Programming 12 12-02-2004 10:06 AM
C Problem---convert char to char* totti10 Programming 11 11-06-2004 11:32 AM
10.0 and Nvidia drivers=white char in bash after exiting KDE please help DDR extreme Mandriva 0 07-20-2004 10:53 PM
invalid conversion from `char' to `const char* bru Programming 6 05-09-2004 03:07 PM
convert from char* to unsigned char* D J Linux - Software 2 02-20-2004 04:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:19 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