Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

modprobe question
Hi All;
I have a program that relies of some modules being loaded. is there a
modprobe() or anything similar? I'm trying to avoid a system("modprobe...")
type call
Thanks
Pat



Report this thread to moderator Post Follow-up to this message
Old Post
Pat Ford
04-15-05 08:59 PM


Re: modprobe question
> is there a [library function] modprobe() or anything similar?

I suggest running your modprobe command under strace and watching what
system calls it does.  man init_module for one of them.  What is your
objection to system("modprobe") anyway?

Beware that you can make your program less portable if you do this
since the kernel interface is subject to change while the modprobe
program tries to present a consistent interface.  See the "backwards
compatibility" section in the modprobe man page.

--Phil.


Report this thread to moderator Post Follow-up to this message
Old Post
phil_gg04@treefic.com
04-15-05 08:59 PM


Re: modprobe question
Pat Ford <pat.ford@nrc.ca> wrote:
>  I have a program that relies of some modules being loaded. is there a
> modprobe() or anything similar? I'm trying to avoid a system("modprobe..."
)
> type call

I guess you're talking about Linux here. If that assumption is correct
you shouldn't have to invoke modprobe at all - if things are set up
correctly (major device number is associated with the module in the
/etc/modules.conf file) then the module should be loaded automatically
the moment (unless is already is) the device file gets opened.

Regards, Jens
--
\   Jens Thoms Toerring  ___  Jens.Toerring@physik.fu-berlin.de
\__________________________  http://www.toerring.de

Report this thread to moderator Post Follow-up to this message
Old Post
Jens.Toerring@physik.fu-berlin.de
04-16-05 01:58 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Unix Programming archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:16 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.