Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-31-2008, 08:49 AM   #1
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, 08:58 AM   #2
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, 08:59 AM   #3
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

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


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

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration