c - How to check the given folder is a mount point -
i have test given folder path mount point or in local system c code.
i read on net /etc/mtab
file have entry mounted point. can check file system call or function check mount point.
my kernel version 2.6.28.10
.
these functions can used data structure access mtab file:
file * setmntent(const char *file, const char *mode) int endmntent (file *stream) struct mntent * getmntent (file *stream) struct mntent * getmntent_r (file *stream, struct mentent *result, char *buffer, int bufsize) int addmntent (file *stream, const struct mntent *mnt) char * hasmntopt (const struct mntent *mnt, const char *opt)
for more details these functions refer man page.
Comments
Post a Comment