shithub: nix

Download patch

ref: 218d044b396ef4c4d365abc9abd417ba5f59d824
parent: c26d56edea946bf2206bc894fe1c944c37d96ce7
author: glenda <glenda@cirno>
date: Sun May 5 22:02:06 EDT 2024

builds.
Need to move squidboy loop here.

--- a/sys/src/nix/pc64/devnix.c
+++ b/sys/src/nix/pc64/devnix.c
@@ -40,7 +40,7 @@
 struct DEVNIX {
 	int online;
 	int nixed;
-} DEVNIX[MAXMACH];
+} nixes[MAXMACH];
 
 int nnix;
 
@@ -50,10 +50,9 @@
 {
 	DEVNIX *nix;
 
-	pcidev = nil;
-
 	for(nnix = 0; nnix < MAXMACH; nnix++){
-		nix = &nixs[nnix];
+		nix = &nixes[nnix];
+		print("nix %p\n", nix);
 		}
 
 
@@ -104,7 +103,7 @@
 		error(Eperm);
 		break;
 	case Q1:
-		error("Eperm")
+		error(Eperm);
 		break;
 	}
 	return devopen(c, omode, nixdir, 3*nnix+1, devgen);
@@ -113,15 +112,8 @@
 static void
 nixclose(Chan *c)
 {
-	int i;
-
 	if(debug&DBGFS)
 		print("nixclose\n");
-	i = 0;
-	switch((ulong)c->qid.path){
-	case Q1:
-	default:
-	}
 }
 
 static long
@@ -146,7 +138,7 @@
 	case Qstat:
 		if(i >= nnix)
 			error(Eio);
-		nix = nixs+i;
+		nix = nixes+i;
 		len = snprint(nixinfo, sizeof nixinfo, "sizzle me a sizzler");
 		if(voff > len)
 			return 0;