LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-31-2008, 09:49 AM   #1
pranshu1410
LQ Newbie
 
Registered: Jan 2008
Posts: 1

Rep: Reputation: 0
Accessing mount table from inside the kernel


I want to access mount table from inside the kernel thru a c program. Where i can find the mount table and to access it. I am using 2.6.x kernel..
 
Old 01-31-2008, 09:58 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I don't know what you mean by "access from inside the kernel". Are you writing a kernel module?

From Bash, you can see the mounts in /proc/mounts (This is a "virtual file" which is actually the structure in memory set up by the kernel. I would assume that a C header file would have an interface for this.)
 
Old 01-31-2008, 09:59 AM   #3
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
There's also
man 2 mount
if you want to manipulate mounts from C code.
 
  


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
Accessing IP table. bharati.bhole Linux - Newbie 2 01-30-2008 02:46 PM
accessing local webserver from inside LAN using FQDN zamri Linux - Networking 4 10-12-2006 09:36 PM
accessing variables inside a function bahadur Programming 1 03-27-2005 05:41 AM
How do you mount a XP partition inside Virtual PC? chobits Linux - Newbie 0 12-27-2004 03:01 PM
retriving mysql data, and placing it inside a table in html using perl rhuser Programming 1 03-12-2003 06:04 AM


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