Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jul 2020 11:26:03 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r362930 - head/sys/compat/linprocfs
Message-ID:  <202007041126.064BQ38W014009@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sat Jul  4 11:26:03 2020
New Revision: 362930
URL: https://svnweb.freebsd.org/changeset/base/362930

Log:
  Add /proc/sys/kernel/tainted to linprocfs(5).  Helps LTP.
  
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D25556

Modified:
  head/sys/compat/linprocfs/linprocfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- head/sys/compat/linprocfs/linprocfs.c	Sat Jul  4 11:22:35 2020	(r362929)
+++ head/sys/compat/linprocfs/linprocfs.c	Sat Jul  4 11:26:03 2020	(r362930)
@@ -1414,6 +1414,17 @@ linprocfs_dosem(PFS_FILL_ARGS)
 }
 
 /*
+ * Filler function for proc/sys/kernel/tainted
+ */
+static int
+linprocfs_dotainted(PFS_FILL_ARGS)
+{
+
+	sbuf_printf(sb, "0\n");
+	return (0);
+}
+
+/*
  * Filler function for proc/sys/vm/min_free_kbytes
  *
  * This mirrors the approach in illumos to return zero for reads. Effectively,
@@ -1814,6 +1825,8 @@ linprocfs_init(PFS_INIT_ARGS)
 	pfs_create_file(dir, "pid_max", &linprocfs_dopid_max,
 	    NULL, NULL, NULL, PFS_RD);
 	pfs_create_file(dir, "sem", &linprocfs_dosem,
+	    NULL, NULL, NULL, PFS_RD);
+	pfs_create_file(dir, "tainted", &linprocfs_dotainted,
 	    NULL, NULL, NULL, PFS_RD);
 
 	/* /proc/sys/kernel/random/... */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007041126.064BQ38W014009>