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/... */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to