Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/vfs_mount.c
Show First 20 Lines • Show All 1,825 Lines • ▼ Show 20 Lines | TAILQ_FOREACH(opt, opts, link) { | ||||
} | } | ||||
} | } | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
int | int | ||||
__vfs_statfs(struct mount *mp, struct statfs *sbp) | __vfs_statfs(struct mount *mp, struct statfs *sbp) | ||||
{ | { | ||||
int error; | |||||
error = mp->mnt_op->vfs_statfs(mp, &mp->mnt_stat); | /* | ||||
if (sbp != &mp->mnt_stat) | * Set these in case the underlying filesystem fails to do so. | ||||
*sbp = mp->mnt_stat; | */ | ||||
return (error); | sbp->f_version = STATFS_VERSION; | ||||
sbp->f_namemax = NAME_MAX; | |||||
sbp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; | |||||
return (mp->mnt_op->vfs_statfs(mp, sbp)); | |||||
} | } | ||||
void | void | ||||
vfs_mountedfrom(struct mount *mp, const char *from) | vfs_mountedfrom(struct mount *mp, const char *from) | ||||
{ | { | ||||
bzero(mp->mnt_stat.f_mntfromname, sizeof mp->mnt_stat.f_mntfromname); | bzero(mp->mnt_stat.f_mntfromname, sizeof mp->mnt_stat.f_mntfromname); | ||||
strlcpy(mp->mnt_stat.f_mntfromname, from, | strlcpy(mp->mnt_stat.f_mntfromname, from, | ||||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |