summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2013-04-15 15:32:19 +0000
committerjsing <jsing@openbsd.org>2013-04-15 15:32:19 +0000
commitaec3986e4c77ef418b044f5a18f9ea2d3dfdc5ca (patch)
tree0ef0402a8c1ce45cd17a6e33cb6f909d524c8384 /sys/miscfs
parentsync (diff)
downloadwireguard-openbsd-aec3986e4c77ef418b044f5a18f9ea2d3dfdc5ca.tar.xz
wireguard-openbsd-aec3986e4c77ef418b044f5a18f9ea2d3dfdc5ca.zip
Add an f_mntfromspec member to struct statfs, which specifies the name of
the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/procfs/procfs_vfsops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c
index 74af59994e1..c1d2e3022df 100644
--- a/sys/miscfs/procfs/procfs_vfsops.c
+++ b/sys/miscfs/procfs/procfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: procfs_vfsops.c,v 1.28 2012/09/10 11:10:59 jsing Exp $ */
+/* $OpenBSD: procfs_vfsops.c,v 1.29 2013/04/15 15:32:19 jsing Exp $ */
/* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */
/*
@@ -104,6 +104,8 @@ procfs_mount(struct mount *mp, const char *path, void *data, struct nameidata *n
strlcpy(mp->mnt_stat.f_mntonname, path, MNAMELEN);
bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
bcopy("procfs", mp->mnt_stat.f_mntfromname, sizeof("procfs"));
+ bzero(mp->mnt_stat.f_mntfromspec, MNAMELEN);
+ bcopy("procfs", mp->mnt_stat.f_mntfromspec, sizeof("procfs"));
bcopy(&args, &mp->mnt_stat.mount_info.procfs_args, sizeof(args));
#ifdef notyet
@@ -181,6 +183,7 @@ procfs_statfs(struct mount *mp, struct statfs *sbp, struct proc *p)
bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid));
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
+ bcopy(mp->mnt_stat.f_mntfromspec, sbp->f_mntfromspec, MNAMELEN);
bcopy(&mp->mnt_stat.mount_info.procfs_args,
&sbp->mount_info.procfs_args, sizeof(struct procfs_args));
}