Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Finally remove the "temporary" __VTYPE_DEFINED stuff I added...



details:   https://anonhg.NetBSD.org/src/rev/c10b26ceff3e
branches:  trunk
changeset: 782745:c10b26ceff3e
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sun Nov 18 18:39:23 2012 +0000

description:
Finally remove the "temporary" __VTYPE_DEFINED stuff I added >5 years ago.

diffstat:

 lib/libp2k/p2k.c                        |  6 +++---
 sys/rump/include/rump/makerumpdefs.sh   |  7 +++----
 sys/rump/librump/rumpvfs/rump_vfs.c     |  8 ++++----
 sys/rump/librump/rumpvfs/rumpvfs.ifspec |  7 ++++---
 sys/sys/vnode.h                         |  9 ++-------
 5 files changed, 16 insertions(+), 21 deletions(-)

diffs (142 lines):

diff -r 61046b1eeb79 -r c10b26ceff3e lib/libp2k/p2k.c
--- a/lib/libp2k/p2k.c  Sun Nov 18 18:36:01 2012 +0000
+++ b/lib/libp2k/p2k.c  Sun Nov 18 18:39:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: p2k.c,v 1.57 2012/08/16 09:25:44 manu Exp $    */
+/*     $NetBSD: p2k.c,v 1.58 2012/11/18 18:39:23 pooka Exp $   */
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -651,7 +651,7 @@
        struct mount *mp = p2m->p2m_mp;
        struct p2k_node *p2n;
        struct vnode *vp;
-       enum vtype vtype;
+       enum rump_vtype vtype;
        voff_t vsize;
        uint64_t rdev; /* XXX: allows running this on NetBSD 5.0 */
        int rv;
@@ -714,7 +714,7 @@
        struct p2k_node *p2n_dir = opc, *p2n;
        struct componentname *cn;
        struct vnode *dvp = p2n_dir->p2n_vp, *vp;
-       enum vtype vtype;
+       enum rump_vtype vtype;
        voff_t vsize;
        uint64_t rdev; /* XXX: uint64_t because of stack overwrite in compat */
        int rv;
diff -r 61046b1eeb79 -r c10b26ceff3e sys/rump/include/rump/makerumpdefs.sh
--- a/sys/rump/include/rump/makerumpdefs.sh     Sun Nov 18 18:36:01 2012 +0000
+++ b/sys/rump/include/rump/makerumpdefs.sh     Sun Nov 18 18:39:23 2012 +0000
@@ -8,11 +8,12 @@
 rm -f rumpdefs.h
 exec > rumpdefs.h
 
-printf '/*     $NetBSD: makerumpdefs.sh,v 1.7 2012/07/20 09:02:48 pooka Exp $  */\n\n'
+printf '/*     $NetBSD: makerumpdefs.sh,v 1.8 2012/11/18 18:39:23 pooka Exp $  */\n\n'
 printf '/*\n *\tAUTOMATICALLY GENERATED.  DO NOT EDIT.\n */\n\n'
 printf '#ifndef _RUMP_RUMPDEFS_H_\n'
 printf '#define _RUMP_RUMPDEFS_H_\n\n'
 printf '#include <rump/rump_namei.h>\n'
+printf '#include <inttypes>\n'
 
 fromvers () {
        echo
@@ -40,9 +41,7 @@
     < ../../../sys/fcntl.h
 
 fromvers ../../../sys/vnode.h
-printf '#ifndef __VTYPE_DEFINED\n#define __VTYPE_DEFINED\n'
-sed -n '/enum vtype.*{/p' < ../../../sys/vnode.h
-printf '#endif /* __VTYPE_DEFINED */\n'
+sed -n '/enum vtype.*{/{s/vtype/rump_&/;s/ V/ RUMP_V/gp}' < ../../../sys/vnode.h
 sed -n '/#define.*LK_[A-Z]/s/LK_/RUMP_LK_/gp' <../../../sys/vnode.h    \
     | sed 's,/\*.*$,,'
 
diff -r 61046b1eeb79 -r c10b26ceff3e sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c       Sun Nov 18 18:36:01 2012 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c       Sun Nov 18 18:39:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump_vfs.c,v 1.68 2012/11/05 17:24:12 dholland Exp $   */
+/*     $NetBSD: rump_vfs.c,v 1.69 2012/11/18 18:39:23 pooka Exp $      */
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.68 2012/11/05 17:24:12 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.69 2012/11/18 18:39:23 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -265,7 +265,7 @@
 }
 
 void
-rump_getvninfo(struct vnode *vp, enum vtype *vtype,
+rump_getvninfo(struct vnode *vp, enum rump_vtype *vtype,
        voff_t *vsize, dev_t *vdev)
 {
 
@@ -320,7 +320,7 @@
 }
 
 void
-rump_vattr_settype(struct vattr *vap, enum vtype vt)
+rump_vattr_settype(struct vattr *vap, enum rump_vtype vt)
 {
 
        vap->va_type = vt;
diff -r 61046b1eeb79 -r c10b26ceff3e sys/rump/librump/rumpvfs/rumpvfs.ifspec
--- a/sys/rump/librump/rumpvfs/rumpvfs.ifspec   Sun Nov 18 18:36:01 2012 +0000
+++ b/sys/rump/librump/rumpvfs/rumpvfs.ifspec   Sun Nov 18 18:39:23 2012 +0000
@@ -1,4 +1,4 @@
-;       $NetBSD: rumpvfs.ifspec,v 1.7 2010/11/30 15:41:35 pooka Exp $
+;       $NetBSD: rumpvfs.ifspec,v 1.8 2012/11/18 18:39:23 pooka Exp $
 
 NAME|vfs
 PUBHDR|include/rump/rumpvfs_if_pub.h
@@ -8,13 +8,14 @@
 ; type          | name          | args         | attrs
 ;
 
-void           |getvninfo      |struct vnode *, enum vtype *, off_t *, dev_t *
+void           |getvninfo      |struct vnode *, enum rump_vtype *,     \
+                                off_t *, dev_t *
 
 struct vfsops *        |vfslist_iterate|struct vfsops *
 struct vfsops *        |vfs_getopsbyname|const char *
 
 struct vattr * |vattr_init     |void
-void           |vattr_settype  |struct vattr *, enum vtype
+void           |vattr_settype  |struct vattr *, enum rump_vtype
 void           |vattr_setmode  |struct vattr *, mode_t
 void           |vattr_setrdev  |struct vattr *, dev_t
 void           |vattr_free     |struct vattr *
diff -r 61046b1eeb79 -r c10b26ceff3e sys/sys/vnode.h
--- a/sys/sys/vnode.h   Sun Nov 18 18:36:01 2012 +0000
+++ b/sys/sys/vnode.h   Sun Nov 18 18:39:23 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnode.h,v 1.236 2011/11/24 15:51:30 ahoka Exp $        */
+/*     $NetBSD: vnode.h,v 1.237 2012/11/18 18:39:24 pooka Exp $        */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -82,14 +82,9 @@
  */
 
 /*
- * Vnode types.  VNON means no type.  __VTYPE_DEFINED allows other
- * sources to override this definition.  __VTYPE_DEFINED should be
- * considered a temporary feature.
+ * Vnode types.  VNON means no type.
  */
-#ifndef __VTYPE_DEFINED
-#define __VTYPE_DEFINED
 enum vtype     { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
-#endif /* __VTYPE_DEFINED */
 
 #define        VNODE_TYPES \
     "VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD"



Home | Main Index | Thread Index | Old Index