diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-05 20:47:37 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-08-05 20:47:37 +0000 |
commit | fc303ede4c1e119db3d3579c71d5c79c02c595cd (patch) | |
tree | 6f24990651e4175ed22b990cbe2ebc8e326140b2 /sys | |
parent | 427eaf0c8f0f97b45b86d519f20c366145bdf4cc (diff) |
make procfs support statfs args. lossage noticed and patch tested by jolan
Diffstat (limited to 'sys')
-rw-r--r-- | sys/miscfs/procfs/procfs.h | 11 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vfsops.c | 5 | ||||
-rw-r--r-- | sys/sys/mount.h | 13 |
3 files changed, 17 insertions, 12 deletions
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h index 56c967bcc88..e731edcdc32 100644 --- a/sys/miscfs/procfs/procfs.h +++ b/sys/miscfs/procfs/procfs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs.h,v 1.18 2003/06/02 23:28:10 millert Exp $ */ +/* $OpenBSD: procfs.h,v 1.19 2003/08/05 20:47:36 tedu Exp $ */ /* $NetBSD: procfs.h,v 1.17 1996/02/12 15:01:41 christos Exp $ */ /* @@ -73,15 +73,6 @@ struct pfsnode { #define PROCFS_NOTELEN 64 /* max length of a note (/proc/$pid/note) */ #define PROCFS_CTLLEN 8 /* max length of a ctl msg (/proc/$pid/ctl */ -struct procfs_args { - int version; - int flags; -}; - -#define PROCFS_ARGSVERSION 1 - -#define PROCFSMNT_LINUXCOMPAT 0x01 - /* * Kernel stuff follows */ diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index 3974b2c8969..eab6f80038f 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.20 2003/06/02 23:28:11 millert Exp $ */ +/* $OpenBSD: procfs_vfsops.c,v 1.21 2003/08/05 20:47:36 tedu Exp $ */ /* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */ /* @@ -109,6 +109,7 @@ procfs_mount(mp, path, data, ndp, p) bzero(mp->mnt_stat.f_mntonname + size, MNAMELEN - size); bzero(mp->mnt_stat.f_mntfromname, MNAMELEN); bcopy("procfs", mp->mnt_stat.f_mntfromname, sizeof("procfs")); + bcopy(&args, &mp->mnt_stat.mount_info.procfs_args, sizeof(args)); #ifdef notyet pmnt->pmnt_exechook = exechook_establish(procfs_revoke_vnodes, mp); @@ -196,6 +197,8 @@ procfs_statfs(mp, sbp, 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.mount_info.procfs_args, + &sbp->mount_info.procfs_args, sizeof(struct procfs_args)); } strncpy(sbp->f_fstypename, mp->mnt_vfc->vfc_name, MFSNAMELEN); return (0); diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 2750af8da92..413dfc9b699 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mount.h,v 1.55 2003/07/18 23:02:58 tedu Exp $ */ +/* $OpenBSD: mount.h,v 1.56 2003/08/05 20:47:36 tedu Exp $ */ /* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */ /* @@ -252,6 +252,16 @@ struct ntfs_args { #define NTFS_MFLAG_CASEINS 0x00000001 #define NTFS_MFLAG_ALLNAMES 0x00000002 +struct procfs_args { + int version; + int flags; +}; + +#define PROCFS_ARGSVERSION 1 + +#define PROCFSMNT_LINUXCOMPAT 0x01 + + /* * file system statistics */ @@ -265,6 +275,7 @@ union mount_info { struct mfs_args mfs_args; struct nfs_args nfs_args; struct iso_args iso_args; + struct procfs_args procfs_args; struct msdosfs_args msdosfs_args; struct adosfs_args adosfs_args; struct ntfs_args ntfs_args; |