shithub: riscv

Download patch

ref: 541e211b7c964b7c02dead4e8c61d2add10bc94f
parent: ddf977d25c26d1cc3e83a08d9a3f19907dff35cc
author: cinap_lenrek <[email protected]>
date: Tue Aug 8 06:16:13 EDT 2017

sysinfo: only dump #r/nvram on amd64,386

right now, theres no kernel that stores hostowner keys
in #r/nvram, but this could change in the future. so
only dump #r/nvram on the pc where we know that its
not used to hold keys.

--- a/rc/bin/sysinfo
+++ b/rc/bin/sysinfo
@@ -21,6 +21,7 @@
 	logprog pci -v
 	logprog aux/cpuid
 	logprog aux/icanhasmsi
+	logprog aux/icanhasvmx
 	logprog aux/pcmcia
 	logprog cat '#u/usb/ctl'
 	logprog cat '#S/sdctl'
@@ -33,10 +34,13 @@
 			logprog cat $i/ifstats
 		}
 	}
-	logprog cat '#v/vgactl'
-	echo '@{rfork n; aux/realemu; aux/vga -p}'
-	@{rfork n; aux/realemu; aux/vga -p}
-	logprog xd -x1 '#r/nvram'
+	if(test -e '#v/vgactl'){
+		logprog cat '#v/vgactl'
+		echo '@{rfork n; aux/realemu; aux/vga -p}'
+		@{rfork n; aux/realemu; aux/vga -p}
+	}
+	if(~ $cputype 386 amd64)
+		logprog xd -x1 '#r/nvram'
 	logprog cat '#A/audiostat'
 	logprog cat '#A/volume'
 	logprog cat /mnt/apm/ctl