version 1.3, 1996/06/26 05:38:21 |
version 1.4, 1997/06/17 20:37:53 |
|
|
|
|
entries_left = mntctl(MCTL_QUERY, size, mntbuf); |
entries_left = mntctl(MCTL_QUERY, size, mntbuf); |
if (!entries_left) |
if (!entries_left) |
return((FILE *)NULL); |
return(NULL); |
|
|
mnt = (struct vmount *)mntbuf; |
mnt = (struct vmount *)mntbuf; |
return((FILE *) 1); |
return((FILE *) 1); |
|
|
if (mntbuf) |
if (mntbuf) |
(void) free(mntbuf); |
(void) free(mntbuf); |
|
|
size = getfsstat((struct statfs *) NULL, 0, MNT_WAIT); |
size = getfsstat(NULL, 0, MNT_WAIT); |
if (size == -1) |
if (size == -1) |
return ((FILE *)NULL); |
return (NULL); |
size *= sizeof(struct statfs); |
size *= sizeof(struct statfs); |
mntbuf = (char *) xmalloc(size); |
mntbuf = (char *) xmalloc(size); |
|
|
entries_left = getfsstat((struct statfs *)mntbuf, size, MNT_WAIT); |
entries_left = getfsstat((struct statfs *)mntbuf, size, MNT_WAIT); |
if (entries_left == -1) |
if (entries_left == -1) |
return((FILE *) NULL); |
return(NULL); |
|
|
mnt = (struct statfs *) mntbuf; |
mnt = (struct statfs *) mntbuf; |
|
|
|
|
|
|
if (mntbuf) { |
if (mntbuf) { |
(void) free(mntbuf); |
(void) free(mntbuf); |
mntbuf = (char *) NULL; |
mntbuf = NULL; |
} |
} |
} |
} |
#endif /* FSI_MNTCTL || FSI_GETFSSTAT */ |
#endif /* FSI_MNTCTL || FSI_GETFSSTAT */ |
|
|
|
|
return(&me); |
return(&me); |
} else |
} else |
return((mntent_t *) NULL); |
return(NULL); |
} |
} |
#endif /* FSI_GETMNTNET2 */ |
#endif /* FSI_GETMNTNET2 */ |
|
|
|
|
|
|
return(&me); |
return(&me); |
} else |
} else |
return((mntent_t *) NULL); |
return(NULL); |
} |
} |
#endif /* FSI_GETMNTNET */ |
#endif /* FSI_GETMNTNET */ |
|
|
|
|
static mntent_t me; |
static mntent_t me; |
|
|
if (getmnt(&startmounts, &fs_data, sizeof(fs_data), NOSTAT_MANY, |
if (getmnt(&startmounts, &fs_data, sizeof(fs_data), NOSTAT_MANY, |
(char *) NULL) <= 0) |
NULL) <= 0) |
return((mntent_t *) NULL); |
return(NULL); |
|
|
bzero((char *)&me, sizeof(mntent_t)); |
bzero((char *)&me, sizeof(mntent_t)); |
me.me_path = fs_data.fd_path; |
me.me_path = fs_data.fd_path; |
|
|
mntent_t *new; |
mntent_t *new; |
|
|
if (!old) |
if (!old) |
return((mntent_t *) NULL); |
return(NULL); |
|
|
new = (mntent_t *) xcalloc(1, sizeof(mntent_t)); |
new = (mntent_t *) xcalloc(1, sizeof(mntent_t)); |
new->me_path = strdup(old->me_path); |
new->me_path = strdup(old->me_path); |