version 1.12, 2015/01/16 06:40:11 |
version 1.13, 2015/01/20 09:00:16 |
|
|
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/mount.h> |
#include <sys/mount.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
|
|
#include "defs.h" |
#include "server.h" |
|
|
/* |
/* |
* OS specific file system routines |
* OS specific file system routines |
|
|
if (strcmp(mnt->f_fstypename, "nfs") == 0) { |
if (strcmp(mnt->f_fstypename, "nfs") == 0) { |
strlcpy(remote_dev, mnt->f_mntfromname, sizeof(remote_dev)); |
strlcpy(remote_dev, mnt->f_mntfromname, sizeof(remote_dev)); |
mntstruct.me_path = remote_dev; |
mntstruct.me_path = remote_dev; |
mntstruct.me_type = METYPE_NFS; |
mntstruct.me_flags |= MEFLAG_NFS; |
} else { |
} else |
mntstruct.me_path = mnt->f_mntonname; |
mntstruct.me_path = mnt->f_mntonname; |
mntstruct.me_type = METYPE_OTHER; |
|
} |
|
|
|
mnt++; |
mnt++; |
entries_left--; |
entries_left--; |
|
|
|
|
new = xmalloc(sizeof *new); |
new = xmalloc(sizeof *new); |
new->me_path = xstrdup(old->me_path); |
new->me_path = xstrdup(old->me_path); |
new->me_type = xstrdup(old->me_type); |
|
new->me_flags = old->me_flags; |
new->me_flags = old->me_flags; |
|
|
return (new); |
return (new); |