Linux function to get mount points
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
Is there a function (or interface; ioctl, netlink etc) in the standard Linux libs that will return the current mounts directly from the kernel without parsing /proc? strace
ing the mount command, it looks like it parses files in /proc
c linux mount libc
add a comment |
Is there a function (or interface; ioctl, netlink etc) in the standard Linux libs that will return the current mounts directly from the kernel without parsing /proc? strace
ing the mount command, it looks like it parses files in /proc
c linux mount libc
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
1
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
4
Why do you want to avoid/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!
– Basile Starynkevitch
Feb 14 '12 at 21:38
add a comment |
Is there a function (or interface; ioctl, netlink etc) in the standard Linux libs that will return the current mounts directly from the kernel without parsing /proc? strace
ing the mount command, it looks like it parses files in /proc
c linux mount libc
Is there a function (or interface; ioctl, netlink etc) in the standard Linux libs that will return the current mounts directly from the kernel without parsing /proc? strace
ing the mount command, it looks like it parses files in /proc
c linux mount libc
c linux mount libc
asked Feb 14 '12 at 16:47
tMCtMC
8,07094991
8,07094991
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
1
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
4
Why do you want to avoid/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!
– Basile Starynkevitch
Feb 14 '12 at 21:38
add a comment |
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
1
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
4
Why do you want to avoid/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!
– Basile Starynkevitch
Feb 14 '12 at 21:38
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
1
1
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
4
4
Why do you want to avoid
/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!– Basile Starynkevitch
Feb 14 '12 at 21:38
Why do you want to avoid
/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!– Basile Starynkevitch
Feb 14 '12 at 21:38
add a comment |
2 Answers
2
active
oldest
votes
Please see the clarification at the bottom of the answer for the reasoning being used in this answer.
Is there any reason that you would not use the getmntent
libc library call? I do realize that it's not the same as an 'all in one' system call, but it should allow you to get the relevant information.
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %sn", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
}
Clarification
Considering that the OP clarified about trying to do this without having /proc
mounted, I'm going to clarify:
There is no facility outside of
/proc
for getting the fully qualified list of mounted file systems from the linux kernel. There is no system call, there is no ioctl. The/proc
interface is the agreed upon interface.
With that said, if you don't have /proc
mounted, you will have to parse the /etc/mtab
file - pass in /etc/mtab
instead of /proc/mounts
to the initial setmntent
call.
It is an agreed upon protocol that the mount
and unmount
commands will maintain a list of currently mounted filesystems in the file /etc/mtab. This is detailed in almost all linux/unix/bsd manual pages for these commands. So if you don't have /proc
you can sort of rely on the contents of this file. It's not guaranteed to be a source of truth, but conventions are conventions for these things.
So, if you don't have /proc
, you would use /etc/mtab
in the getmntent
libc library call below to get the list of file systems; otherwise you could use one of /proc/mounts
or /proc/self/mountinfo
(which is recommended nowadays over /proc/mounts
).
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
Bothdf
andmount
use/proc/self/mountinfo
instead of/proc/mounts
, but result is the same.
– Ivan Black
Feb 27 '16 at 19:58
1
Keep in mind thatgetmntent
is not thread safe. There isgetmntent_r
(GNU extension).
– Ivan Black
Feb 28 '16 at 11:04
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
add a comment |
There is no syscall to list this information; instead, you can find it in the file /etc/mtab
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:/proc/mounts
is an implementation detail./etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have/proc/mounts
but it's a link :-)
– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that/etc/mtab
is not a file but a link to/proc/mounts
on Raspbian Jessie.
– Zimano
May 4 '17 at 8:32
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9280759%2flinux-function-to-get-mount-points%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Please see the clarification at the bottom of the answer for the reasoning being used in this answer.
Is there any reason that you would not use the getmntent
libc library call? I do realize that it's not the same as an 'all in one' system call, but it should allow you to get the relevant information.
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %sn", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
}
Clarification
Considering that the OP clarified about trying to do this without having /proc
mounted, I'm going to clarify:
There is no facility outside of
/proc
for getting the fully qualified list of mounted file systems from the linux kernel. There is no system call, there is no ioctl. The/proc
interface is the agreed upon interface.
With that said, if you don't have /proc
mounted, you will have to parse the /etc/mtab
file - pass in /etc/mtab
instead of /proc/mounts
to the initial setmntent
call.
It is an agreed upon protocol that the mount
and unmount
commands will maintain a list of currently mounted filesystems in the file /etc/mtab. This is detailed in almost all linux/unix/bsd manual pages for these commands. So if you don't have /proc
you can sort of rely on the contents of this file. It's not guaranteed to be a source of truth, but conventions are conventions for these things.
So, if you don't have /proc
, you would use /etc/mtab
in the getmntent
libc library call below to get the list of file systems; otherwise you could use one of /proc/mounts
or /proc/self/mountinfo
(which is recommended nowadays over /proc/mounts
).
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
Bothdf
andmount
use/proc/self/mountinfo
instead of/proc/mounts
, but result is the same.
– Ivan Black
Feb 27 '16 at 19:58
1
Keep in mind thatgetmntent
is not thread safe. There isgetmntent_r
(GNU extension).
– Ivan Black
Feb 28 '16 at 11:04
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
add a comment |
Please see the clarification at the bottom of the answer for the reasoning being used in this answer.
Is there any reason that you would not use the getmntent
libc library call? I do realize that it's not the same as an 'all in one' system call, but it should allow you to get the relevant information.
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %sn", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
}
Clarification
Considering that the OP clarified about trying to do this without having /proc
mounted, I'm going to clarify:
There is no facility outside of
/proc
for getting the fully qualified list of mounted file systems from the linux kernel. There is no system call, there is no ioctl. The/proc
interface is the agreed upon interface.
With that said, if you don't have /proc
mounted, you will have to parse the /etc/mtab
file - pass in /etc/mtab
instead of /proc/mounts
to the initial setmntent
call.
It is an agreed upon protocol that the mount
and unmount
commands will maintain a list of currently mounted filesystems in the file /etc/mtab. This is detailed in almost all linux/unix/bsd manual pages for these commands. So if you don't have /proc
you can sort of rely on the contents of this file. It's not guaranteed to be a source of truth, but conventions are conventions for these things.
So, if you don't have /proc
, you would use /etc/mtab
in the getmntent
libc library call below to get the list of file systems; otherwise you could use one of /proc/mounts
or /proc/self/mountinfo
(which is recommended nowadays over /proc/mounts
).
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
Bothdf
andmount
use/proc/self/mountinfo
instead of/proc/mounts
, but result is the same.
– Ivan Black
Feb 27 '16 at 19:58
1
Keep in mind thatgetmntent
is not thread safe. There isgetmntent_r
(GNU extension).
– Ivan Black
Feb 28 '16 at 11:04
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
add a comment |
Please see the clarification at the bottom of the answer for the reasoning being used in this answer.
Is there any reason that you would not use the getmntent
libc library call? I do realize that it's not the same as an 'all in one' system call, but it should allow you to get the relevant information.
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %sn", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
}
Clarification
Considering that the OP clarified about trying to do this without having /proc
mounted, I'm going to clarify:
There is no facility outside of
/proc
for getting the fully qualified list of mounted file systems from the linux kernel. There is no system call, there is no ioctl. The/proc
interface is the agreed upon interface.
With that said, if you don't have /proc
mounted, you will have to parse the /etc/mtab
file - pass in /etc/mtab
instead of /proc/mounts
to the initial setmntent
call.
It is an agreed upon protocol that the mount
and unmount
commands will maintain a list of currently mounted filesystems in the file /etc/mtab. This is detailed in almost all linux/unix/bsd manual pages for these commands. So if you don't have /proc
you can sort of rely on the contents of this file. It's not guaranteed to be a source of truth, but conventions are conventions for these things.
So, if you don't have /proc
, you would use /etc/mtab
in the getmntent
libc library call below to get the list of file systems; otherwise you could use one of /proc/mounts
or /proc/self/mountinfo
(which is recommended nowadays over /proc/mounts
).
Please see the clarification at the bottom of the answer for the reasoning being used in this answer.
Is there any reason that you would not use the getmntent
libc library call? I do realize that it's not the same as an 'all in one' system call, but it should allow you to get the relevant information.
#include <stdio.h>
#include <stdlib.h>
#include <mntent.h>
int main(void)
{
struct mntent *ent;
FILE *aFile;
aFile = setmntent("/proc/mounts", "r");
if (aFile == NULL) {
perror("setmntent");
exit(1);
}
while (NULL != (ent = getmntent(aFile))) {
printf("%s %sn", ent->mnt_fsname, ent->mnt_dir);
}
endmntent(aFile);
}
Clarification
Considering that the OP clarified about trying to do this without having /proc
mounted, I'm going to clarify:
There is no facility outside of
/proc
for getting the fully qualified list of mounted file systems from the linux kernel. There is no system call, there is no ioctl. The/proc
interface is the agreed upon interface.
With that said, if you don't have /proc
mounted, you will have to parse the /etc/mtab
file - pass in /etc/mtab
instead of /proc/mounts
to the initial setmntent
call.
It is an agreed upon protocol that the mount
and unmount
commands will maintain a list of currently mounted filesystems in the file /etc/mtab. This is detailed in almost all linux/unix/bsd manual pages for these commands. So if you don't have /proc
you can sort of rely on the contents of this file. It's not guaranteed to be a source of truth, but conventions are conventions for these things.
So, if you don't have /proc
, you would use /etc/mtab
in the getmntent
libc library call below to get the list of file systems; otherwise you could use one of /proc/mounts
or /proc/self/mountinfo
(which is recommended nowadays over /proc/mounts
).
edited Nov 23 '18 at 17:10
answered Feb 15 '12 at 8:41
PeteshPetesh
70.6k37497
70.6k37497
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
Bothdf
andmount
use/proc/self/mountinfo
instead of/proc/mounts
, but result is the same.
– Ivan Black
Feb 27 '16 at 19:58
1
Keep in mind thatgetmntent
is not thread safe. There isgetmntent_r
(GNU extension).
– Ivan Black
Feb 28 '16 at 11:04
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
add a comment |
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
Bothdf
andmount
use/proc/self/mountinfo
instead of/proc/mounts
, but result is the same.
– Ivan Black
Feb 27 '16 at 19:58
1
Keep in mind thatgetmntent
is not thread safe. There isgetmntent_r
(GNU extension).
– Ivan Black
Feb 28 '16 at 11:04
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
I have an embedded system that could have made use of this info during boot; before /proc was mounted.
– tMC
Feb 15 '12 at 14:46
1
1
Both
df
and mount
use /proc/self/mountinfo
instead of /proc/mounts
, but result is the same.– Ivan Black
Feb 27 '16 at 19:58
Both
df
and mount
use /proc/self/mountinfo
instead of /proc/mounts
, but result is the same.– Ivan Black
Feb 27 '16 at 19:58
1
1
Keep in mind that
getmntent
is not thread safe. There is getmntent_r
(GNU extension).– Ivan Black
Feb 28 '16 at 11:04
Keep in mind that
getmntent
is not thread safe. There is getmntent_r
(GNU extension).– Ivan Black
Feb 28 '16 at 11:04
1
1
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
Yes, well aware of all the limitations of the entire API cluster of *ent calls. Reading from the per process mountinfo file is now preferred.
– Petesh
Feb 28 '16 at 11:10
add a comment |
There is no syscall to list this information; instead, you can find it in the file /etc/mtab
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:/proc/mounts
is an implementation detail./etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have/proc/mounts
but it's a link :-)
– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that/etc/mtab
is not a file but a link to/proc/mounts
on Raspbian Jessie.
– Zimano
May 4 '17 at 8:32
add a comment |
There is no syscall to list this information; instead, you can find it in the file /etc/mtab
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:/proc/mounts
is an implementation detail./etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have/proc/mounts
but it's a link :-)
– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that/etc/mtab
is not a file but a link to/proc/mounts
on Raspbian Jessie.
– Zimano
May 4 '17 at 8:32
add a comment |
There is no syscall to list this information; instead, you can find it in the file /etc/mtab
There is no syscall to list this information; instead, you can find it in the file /etc/mtab
answered Feb 15 '12 at 8:25
Aaron DigullaAaron Digulla
250k87482701
250k87482701
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:/proc/mounts
is an implementation detail./etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have/proc/mounts
but it's a link :-)
– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that/etc/mtab
is not a file but a link to/proc/mounts
on Raspbian Jessie.
– Zimano
May 4 '17 at 8:32
add a comment |
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:/proc/mounts
is an implementation detail./etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have/proc/mounts
but it's a link :-)
– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that/etc/mtab
is not a file but a link to/proc/mounts
on Raspbian Jessie.
– Zimano
May 4 '17 at 8:32
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
mtab is just a symlink to /proc/mounts on most systems.
– tMC
Sep 14 '12 at 18:16
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
symlink or hard link? I remember that in the old days mtab was not reliable...
– Alexis Wilke
Oct 21 '14 at 8:32
@tMC:
/proc/mounts
is an implementation detail. /etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have /proc/mounts
but it's a link :-)– Aaron Digulla
Oct 21 '14 at 9:08
@tMC:
/proc/mounts
is an implementation detail. /etc/mtab
is a standard file which you will find on almost any Unix-like system. I didn't check but I think it's part of the standard. So you can rely on it. And I wouldn't say "on most system". In my Ubuntu and OpenSuSE systems, it's a plain file. I do have /proc/mounts
but it's a link :-)– Aaron Digulla
Oct 21 '14 at 9:08
I can confirm that
/etc/mtab
is not a file but a link to /proc/mounts
on Raspbian Jessie.– Zimano
May 4 '17 at 8:32
I can confirm that
/etc/mtab
is not a file but a link to /proc/mounts
on Raspbian Jessie.– Zimano
May 4 '17 at 8:32
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f9280759%2flinux-function-to-get-mount-points%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
stackoverflow.com/questions/5095976/mount-system-call
– Satish
Feb 14 '12 at 17:14
1
@Satish that mounts a filesystem- it does not return current mounts
– tMC
Feb 14 '12 at 18:25
4
Why do you want to avoid
/proc/
?? under linux, it is the preferred way to retrieve such information! And it is very simple too!!– Basile Starynkevitch
Feb 14 '12 at 21:38