ref: 5bb60a06b61388bbd2e29a20b2a363346f9c9dbc
parent: 09850aace73fb524325c96b0adf94f9a34ae69a2
author: glenda <glenda@cirno>
date: Tue May 7 11:25:37 EDT 2024
builds, and ls works.
--- a/sys/src/nix/pc64/devnix.c
+++ b/sys/src/nix/pc64/devnix.c
@@ -19,7 +19,7 @@
#define DBGINTS 0x08
#define DBGFS 0x10
-int debug = DBGREAD|DBGWRIT|DBGFS;
+int debug = 0x1f | DBGREAD|DBGWRIT|DBGFS;
enum{
Qdir,
@@ -42,7 +42,7 @@
int nixed;
} nixes[MAXMACH];
-int nnix;
+int nnix = 1; // fix later
static void
@@ -50,6 +50,7 @@
{
DEVNIX *nix;
+ if (0)
for(nnix = 0; nnix < MAXMACH; nnix++){
nix = &nixes[nnix];
print("nix %p\n", nix);
@@ -64,7 +65,7 @@
{
if(debug&DBGFS)
print("nixattach\n");
- return devattach(L'Λ', spec);
+ return devattach(L'Z', spec);
}
static Walkqid*
@@ -103,6 +104,7 @@
error(Eperm);
break;
case Q1:
+ print("we really oughtta nix\n");
error(Eperm);
break;
}
@@ -128,6 +130,9 @@
i = 0;
switch((ulong)c->qid.path){
case Qdir:
+ if(debug&(DBGFS|DBGREAD))
+ print("nixread %p %d %d\n", va, n, voff);
+
n = devdirread(c, (char *)buf, n, nixdir, 3*nnix+1, devgen);
if(debug&(DBGFS|DBGREAD))
print("nixread %ld\n", n);
@@ -161,7 +166,7 @@
}
Dev nixdevtab = {
- L'Λ',
+ L'Z',
"nix",
nixreset,