Module Name:    src
Committed By:   pgoyette
Date:           Sat Sep 14 01:37:42 UTC 2024

Modified Files:
        src/sys/miscfs/procfs: procfs_linux.c procfs_vfsops.c

Log Message:
Define dependencies based on build options.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/miscfs/procfs/procfs_linux.c
cvs rdiff -u -r1.119 -r1.120 src/sys/miscfs/procfs/procfs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/miscfs/procfs/procfs_linux.c
diff -u src/sys/miscfs/procfs/procfs_linux.c:1.89 src/sys/miscfs/procfs/procfs_linux.c:1.90
--- src/sys/miscfs/procfs/procfs_linux.c:1.89	Mon Jul  1 01:35:53 2024
+++ src/sys/miscfs/procfs/procfs_linux.c	Sat Sep 14 01:37:42 2024
@@ -1,4 +1,4 @@
-/*      $NetBSD: procfs_linux.c,v 1.89 2024/07/01 01:35:53 christos Exp $      */
+/*      $NetBSD: procfs_linux.c,v 1.90 2024/09/14 01:37:42 pgoyette Exp $      */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,10 +36,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.89 2024/07/01 01:35:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_linux.c,v 1.90 2024/09/14 01:37:42 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_sysv.h"
+#include "opt_mqueue.h"
 #endif
 
 #include <sys/param.h>
@@ -71,7 +72,9 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_linux
 #ifdef SYSVSHM
 #include <sys/shm.h>
 #endif
+#ifdef MQUEUE
 #include <sys/mqueue.h>
+#endif
 
 #include <miscfs/procfs/procfs.h>
 
@@ -83,10 +86,12 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_linux
 
 extern struct devsw_conv *devsw_conv;
 extern int max_devsw_convs;
+#ifdef MQUEUE
 extern u_int mq_open_max;
 extern u_int mq_max_msgsize;
 extern u_int mq_def_maxmsg;
 extern u_int mq_max_maxmsg;
+#endif
 
 
 #define PGTOB(p)	((unsigned long)(p) << PAGE_SHIFT)
@@ -904,8 +909,11 @@ out:
 	return error;
 }
 
+#ifdef MQUEUE
+#define print_uint(value, uio) PFS_print_uint(value, uio);
+
 static int
-print_uint(unsigned int value, struct uio *uio)
+PFS_print_uint(unsigned int value, struct uio *uio)
 {
 	char *bf;
 	int offset = 0;
@@ -921,6 +929,11 @@ out:
 	free(bf, M_TEMP);
 	return error;
 }
+#else
+
+#define print_uint(value, uio) EINVAL
+
+#endif
 
 int
 procfs_domq_msg_def(struct lwp *curl, struct proc *p,

Index: src/sys/miscfs/procfs/procfs_vfsops.c
diff -u src/sys/miscfs/procfs/procfs_vfsops.c:1.119 src/sys/miscfs/procfs/procfs_vfsops.c:1.120
--- src/sys/miscfs/procfs/procfs_vfsops.c:1.119	Mon Sep  9 15:53:33 2024
+++ src/sys/miscfs/procfs/procfs_vfsops.c	Sat Sep 14 01:37:42 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_vfsops.c,v 1.119 2024/09/09 15:53:33 pgoyette Exp $	*/
+/*	$NetBSD: procfs_vfsops.c,v 1.120 2024/09/14 01:37:42 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -76,10 +76,12 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.119 2024/09/09 15:53:33 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_vfsops.c,v 1.120 2024/09/14 01:37:42 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_netbsd.h"
+#include "opt_sysv_ipc.h"
+#include "opt_mqueue.h"
 #endif
 
 #include <sys/param.h>
@@ -107,7 +109,14 @@ __KERNEL_RCSID(0, "$NetBSD: procfs_vfsop
 
 #include <uvm/uvm_extern.h>			/* for PAGE_SIZE */
 
-MODULE(MODULE_CLASS_VFS, procfs, "ptrace_common,mqueue,sysv_ipc");
+MODULE(MODULE_CLASS_VFS, procfs, "ptrace_common"
+#if defined(MQUEUE)
+				 ",mqueue"
+#endif
+#if defined(SYSVSHM) || defined(SYSVSEM) || defined(SYSVMSG)
+				 ",sysv_ipc"
+#endif
+);
 
 VFS_PROTOS(procfs);
 

Reply via email to