git: 9front

Download patch

ref: 21637f1b26b398864fed2c874aa2e7f223cc2c77
parent: 38b59b972ab67af26384bb6890a31075a7b8f0b8
author: Jacob Moody <moody@posixcafe.org>
date: Fri Feb 20 15:05:15 EST 2026

bootrc: set $NPROC for gefs

Also document that gefs looks at $NPROC in its man page.

--- a/sys/man/4/gefs
+++ b/sys/man/4/gefs
@@ -32,6 +32,10 @@
 is an experimental file server.
 It attempts to be crash safe, snapshotting, and corruption-detecting,
 without giving up too much performance.
+.I Gefs
+makes use of concurrent processes,
+the allocation of which is determined by reading
+.BR $NPROC .
 .PP
 Gefs allows multiple snapshots to be mounted and maintained concurrently.
 These snapshots all share the same storage pool, but can be written to,
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -20,6 +20,11 @@
 # usually better than 1970
 cat '#r/rtc' >/dev/time >[2]/dev/null
 
+# gefs uses $NPROC
+nl='
+'
+NPROC=`$nl{cat /dev/sysstat}; NPROC=$#NPROC
+
 # reparse variables
 for(i in `{ls -Qp /env}){
 	switch($i){
--