version 1.17, 2015/01/16 06:40:11 |
version 1.18, 2015/01/20 09:00:16 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/mount.h> |
#include <sys/mount.h> |
|
#include <errno.h> |
|
#include <string.h> |
|
#include <unistd.h> |
|
|
#include "defs.h" |
#include "server.h" |
|
|
/* |
/* |
* This file contains functions dealing with getting info |
* This file contains functions dealing with getting info |
|
|
|
|
mntinfo = mi; |
mntinfo = mi; |
while ((mnt = getmountent()) != NULL) { |
while ((mnt = getmountent()) != NULL) { |
debugmsg(DM_MISC, "mountent = '%s' (%s)", |
debugmsg(DM_MISC, "mountent = '%s'", mnt->me_path); |
mnt->me_path, mnt->me_type); |
|
|
|
/* |
/* |
* Make sure we don't already have it for some reason |
* Make sure we don't already have it for some reason |
|
|
{ |
{ |
mntent_t *mnt; |
mntent_t *mnt; |
|
|
if ((mnt = (mntent_t *) getmntpt(path, statbuf, isvalid)) == NULL) |
if ((mnt = getmntpt(path, statbuf, isvalid)) == NULL) |
return(-1); |
return(-1); |
|
|
/* |
if (mnt->me_flags & MEFLAG_NFS) |
* We treat "cachefs" just like NFS |
|
*/ |
|
if ((strcmp(mnt->me_type, METYPE_NFS) == 0) || |
|
(strcmp(mnt->me_type, "cachefs") == 0)) |
|
return(1); |
return(1); |
|
|
return(0); |
return(0); |