Source-Changes-HG archive

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

[src/trunk]: src/sys miscfs/fifofs/fifo.h: New home for extern fifo_vnodeop_o...



details:   https://anonhg.NetBSD.org/src/rev/f69ddb4a62be
branches:  trunk
changeset: 372080:f69ddb4a62be
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Oct 26 23:40:20 2022 +0000

description:
miscfs/fifofs/fifo.h: New home for extern fifo_vnodeop_opv_desc.

Add include guard and fix missing includes while here too.

diffstat:

 sys/kern/vfs_init.c      |   7 +++----
 sys/miscfs/fifofs/fifo.h |  15 +++++++++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diffs (75 lines):

diff -r 984a6c3739b5 -r f69ddb4a62be sys/kern/vfs_init.c
--- a/sys/kern/vfs_init.c       Wed Oct 26 23:40:08 2022 +0000
+++ b/sys/kern/vfs_init.c       Wed Oct 26 23:40:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_init.c,v 1.57 2022/10/26 23:40:08 riastradh Exp $  */
+/*     $NetBSD: vfs_init.c,v 1.58 2022/10/26 23:40:20 riastradh Exp $  */
 
 /*-
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.57 2022/10/26 23:40:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_init.c,v 1.58 2022/10/26 23:40:20 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -86,6 +86,7 @@
 #include <sys/kauth.h>
 
 #include <miscfs/deadfs/deadfs.h>
+#include <miscfs/fifofs/fifo.h>
 #include <miscfs/specfs/specdev.h>
 
 /*
@@ -109,8 +110,6 @@
  * associated with any particular file system, and thus cannot
  * be initialized by vfs_attach().
  */
-extern const struct vnodeopv_desc fifo_vnodeop_opv_desc;
-
 const struct vnodeopv_desc * const vfs_special_vnodeopv_descs[] = {
        &dead_vnodeop_opv_desc,
        &fifo_vnodeop_opv_desc,
diff -r 984a6c3739b5 -r f69ddb4a62be sys/miscfs/fifofs/fifo.h
--- a/sys/miscfs/fifofs/fifo.h  Wed Oct 26 23:40:08 2022 +0000
+++ b/sys/miscfs/fifofs/fifo.h  Wed Oct 26 23:40:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fifo.h,v 1.27 2021/07/18 23:56:13 dholland Exp $       */
+/*     $NetBSD: fifo.h,v 1.28 2022/10/26 23:40:20 riastradh Exp $      */
 
 /*
  * Copyright (c) 1991, 1993
@@ -31,6 +31,15 @@
  *     @(#)fifo.h      8.6 (Berkeley) 5/21/95
  */
 
+#ifndef _MISCFS_FIFOFS_FIFO_H_
+#define _MISCFS_FIFOFS_FIFO_H_
+
+#include <sys/vnode.h>
+
+#include <miscfs/genfs/genfs.h>
+
+extern const struct vnodeopv_desc fifo_vnodeop_opv_desc;
+
 extern int (**fifo_vnodeop_p)(void *);
 
 /*
@@ -78,7 +87,7 @@
  * fifo_foo (currently via vn_fifo_bypass). For fsync it varies.
  *
  * Note that because the op descriptor tables are unordered it does not
- * matter where in the table this macro goes (except I think default 
+ * matter where in the table this macro goes (except I think default
  * still needs to be first...)
  *
  * XXX currently all the ops are vn_fifo_bypass, which does an
@@ -117,3 +126,5 @@
        { &vop_advlock_desc, vn_fifo_bypass },          /* advlock */   \
        { &vop_getpages_desc, genfs_badop },            /* getpages */  \
        { &vop_putpages_desc, vn_fifo_bypass }          /* putpages */
+
+#endif /* _MISCFS_FIFOFS_FIFO_H_ */



Home | Main Index | Thread Index | Old Index