version 1.1, 1996/02/03 12:12:55 |
version 1.2, 1996/06/13 22:23:06 |
|
|
|
|
#if FSI_TYPE == FSI_GETFSSTAT |
#if FSI_TYPE == FSI_GETFSSTAT |
static struct statfs *mnt = NULL; |
static struct statfs *mnt = NULL; |
typedef u_long ulong; |
|
#if FSTYPENAME |
#if FSTYPENAME |
#define f_type_eq(a, b) (! strcmp (((struct statfs *) (a))->f_fstypename, (b))) |
#define f_type_eq(a, b) (! strcmp (((struct statfs *) (a))->f_fstypename, (b))) |
#else /* !FSTYPENAME */ |
#else /* !FSTYPENAME */ |
|
|
char *file; |
char *file; |
char *mode; |
char *mode; |
{ |
{ |
ulong size; |
u_int size; |
|
|
if (mntbuf) |
if (mntbuf) |
(void) free(mntbuf); |
(void) free(mntbuf); |
|
|
char *file; |
char *file; |
char *mode; |
char *mode; |
{ |
{ |
ulong size; |
int size; |
|
|
if (mntbuf) |
if (mntbuf) |
(void) free(mntbuf); |
(void) free(mntbuf); |
|
|
size = getfsstat((struct statfs *) NULL, 0, MNT_WAIT); |
size = getfsstat((struct statfs *) NULL, 0, MNT_WAIT); |
|
if (size == -1) |
|
return ((FILE *)NULL); |
size *= sizeof(struct statfs); |
size *= sizeof(struct statfs); |
mntbuf = (char *) xmalloc(size); |
mntbuf = (char *) xmalloc(size); |
|
|
|
|
mntstruct.me_flags |= MEFLAG_READONLY; |
mntstruct.me_flags |= MEFLAG_READONLY; |
|
|
mntstruct.me_path = vmt2dataptr(mnt, VMT_STUB); |
mntstruct.me_path = vmt2dataptr(mnt, VMT_STUB); |
switch ((ulong)(struct vmount*)mnt->vmt_gfstype) { |
switch ((struct vmount*)mnt->vmt_gfstype) { |
case MNT_NFS: |
case MNT_NFS: |
mntstruct.me_type = METYPE_NFS; |
mntstruct.me_type = METYPE_NFS; |
break; |
break; |