Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs ptyfs moved from sys/miscfs/ to sys/fs/
details: https://anonhg.NetBSD.org/src/rev/60794fdd6d29
branches: trunk
changeset: 571137:60794fdd6d29
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Thu Nov 11 18:57:21 2004 +0000
description:
ptyfs moved from sys/miscfs/ to sys/fs/
diffstat:
sys/miscfs/Makefile | 4 +-
sys/miscfs/ptyfs/Makefile | 7 -
sys/miscfs/ptyfs/files.ptyfs | 7 -
sys/miscfs/ptyfs/ptyfs.h | 141 -----
sys/miscfs/ptyfs/ptyfs_subr.c | 421 ---------------
sys/miscfs/ptyfs/ptyfs_vfsops.c | 354 -------------
sys/miscfs/ptyfs/ptyfs_vnops.c | 1030 ---------------------------------------
7 files changed, 2 insertions(+), 1962 deletions(-)
diffs (truncated from 1997 to 300 lines):
diff -r 551c24ad14b1 -r 60794fdd6d29 sys/miscfs/Makefile
--- a/sys/miscfs/Makefile Thu Nov 11 18:56:25 2004 +0000
+++ b/sys/miscfs/Makefile Thu Nov 11 18:57:21 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2004/11/11 01:40:32 christos Exp $
+# $NetBSD: Makefile,v 1.7 2004/11/11 18:57:21 jdolecek Exp $
SUBDIR= fdesc fifofs genfs kernfs nullfs overlay portal
-SUBDIR+= procfs ptyfs specfs syncfs umapfs
+SUBDIR+= procfs specfs syncfs umapfs
INCSDIR= /usr/include/miscfs
diff -r 551c24ad14b1 -r 60794fdd6d29 sys/miscfs/ptyfs/Makefile
--- a/sys/miscfs/ptyfs/Makefile Thu Nov 11 18:56:25 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# $NetBSD: Makefile,v 1.1 2004/11/11 01:40:32 christos Exp $
-
-INCSDIR= /usr/include/miscfs/ptyfs
-
-INCS= ptyfs.h
-
-.include <bsd.kinc.mk>
diff -r 551c24ad14b1 -r 60794fdd6d29 sys/miscfs/ptyfs/files.ptyfs
--- a/sys/miscfs/ptyfs/files.ptyfs Thu Nov 11 18:56:25 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-# $NetBSD: files.ptyfs,v 1.1 2004/11/11 01:40:32 christos Exp $
-
-deffs fs_ptyfs.h PTYFS # XXX
-
-file miscfs/ptyfs/ptyfs_subr.c ptyfs
-file miscfs/ptyfs/ptyfs_vfsops.c ptyfs
-file miscfs/ptyfs/ptyfs_vnops.c ptyfs
diff -r 551c24ad14b1 -r 60794fdd6d29 sys/miscfs/ptyfs/ptyfs.h
--- a/sys/miscfs/ptyfs/ptyfs.h Thu Nov 11 18:56:25 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +0,0 @@
-/* $NetBSD: ptyfs.h,v 1.2 2004/11/11 05:46:10 christos Exp $ */
-
-/*
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)procfs.h 8.9 (Berkeley) 5/14/95
- */
-
-/*
- * Copyright (c) 1993 Jan-Simon Pendry
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)procfs.h 8.9 (Berkeley) 5/14/95
- */
-
-#ifdef _KERNEL
-/*
- * The different types of node in a ptyfs filesystem
- */
-typedef enum {
- PTYFSpts, /* The slave side of a pty */
- PTYFSptc, /* The controlling side of a pty */
- PTYFSroot, /* the filesystem root */
-} ptyfstype;
-
-/*
- * control data for the proc file system.
- */
-struct ptyfsnode {
- LIST_ENTRY(ptyfsnode) ptyfs_hash; /* hash chain */
- struct vnode *ptyfs_vnode; /* vnode associated with this ptyfsnode */
- ptyfstype ptyfs_type; /* type of ptyfs node */
- int ptyfs_pty; /* the pty index */
- u_long ptyfs_fileno; /* unique file id */
- int ptyfs_flag; /* status flag for times */
-#define PTYFS_ACCESS 1
-#define PTYFS_MODIFY 2
-#define PTYFS_CHANGE 4
- /* Attribute information */
- uid_t ptyfs_uid;
- gid_t ptyfs_gid;
- mode_t ptyfs_mode;
- int ptyfs_flags;
- struct timespec ptyfs_ctime, ptyfs_mtime, ptyfs_atime, ptyfs_birthtime;
-};
-
-#endif /* _KERNEL */
-
-/*
- * Kernel stuff follows
- */
-#ifdef _KERNEL
-
-#define UIO_MX 32
-
-#define PTYFS_FILENO(pty, type) \
- ((((uint32_t)type) << 30) | (pty + 1))
-
-#define PTYFS_MAKEDEV(ptyfs) \
- pty_makedev((ptyfs)->ptyfs_type == PTYFSpts ? 't' : 'p', (ptyfs)->ptyfs_pty)
-
-/*
- * Convert between ptyfsnode vnode
- */
-#define VTOPTYFS(vp) ((struct ptyfsnode *)(vp)->v_data)
-#define PTYFSTOV(ptyfs) ((ptyfs)->ptyfs_vnode)
-
-int ptyfs_freevp(struct vnode *);
-int ptyfs_allocvp(struct mount *, struct vnode **, ptyfstype, int,
- struct proc *);
-void ptyfs_hashinit(void);
-void ptyfs_hashreinit(void);
-void ptyfs_hashdone(void);
-
-extern int (**ptyfs_vnodeop_p)(void *);
-extern struct vfsops ptyfs_vfsops;
-
-int ptyfs_root(struct mount *, struct vnode **);
-
-#ifdef SYSCTL_SETUP_PROTO
-SYSCTL_SETUP_PROTO(sysctl_vfs_ptyfs_setup);
-#endif /* SYSCTL_SETUP_PROTO */
-#endif /* _KERNEL */
diff -r 551c24ad14b1 -r 60794fdd6d29 sys/miscfs/ptyfs/ptyfs_subr.c
--- a/sys/miscfs/ptyfs/ptyfs_subr.c Thu Nov 11 18:56:25 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,421 +0,0 @@
-/* $NetBSD: ptyfs_subr.c,v 1.1 2004/11/11 01:40:32 christos Exp $ */
-
-/*
- * Copyright (c) 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)ptyfs_subr.c 8.6 (Berkeley) 5/14/95
- */
-
-/*
- * Copyright (c) 1994 Christopher G. Demetriou. All rights reserved.
- * Copyright (c) 1993 Jan-Simon Pendry
- *
- * This code is derived from software contributed to Berkeley by
- * Jan-Simon Pendry.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_subr.c,v 1.1 2004/11/11 01:40:32 christos Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/time.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/malloc.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-#include <sys/namei.h>
-#include <sys/filedesc.h>
-#include <sys/select.h>
-#include <sys/tty.h>
-#include <sys/pty.h>
-
-#include <miscfs/ptyfs/ptyfs.h>
-#include <miscfs/specfs/specdev.h>
-
-static struct lock ptyfs_hashlock;
-
-static LIST_HEAD(ptyfs_hashhead, ptyfsnode) *ptyfs_used_tbl, *ptyfs_free_tbl;
-static u_long ptyfs_used_mask, ptyfs_free_mask; /* size of hash table - 1 */
-static struct simplelock ptyfs_used_slock, ptyfs_free_slock;
-
-static void ptyfs_getinfo(struct ptyfsnode *, struct proc *);
-
-static void ptyfs_hashins(struct ptyfsnode *);
-static void ptyfs_hashrem(struct ptyfsnode *);
-
-static struct vnode *ptyfs_used_get(ptyfstype, int, struct mount *);
-static struct ptyfsnode *ptyfs_free_get(ptyfstype, int, struct proc *);
-
-static void ptyfs_rehash(struct simplelock *, struct ptyfs_hashhead **,
- u_long *);
-
-#define PTYHASH(type, pty, mask) (PTYFS_FILENO(type, pty) % (mask + 1))
-
-
-static void
-ptyfs_getinfo(struct ptyfsnode *ptyfs, struct proc *p)
Home |
Main Index |
Thread Index |
Old Index