moved /dev/mordor to devcons
This commit is contained in:
parent
65b058830b
commit
4d4fc2ca34
4 changed files with 14 additions and 20 deletions
|
@ -12,7 +12,6 @@ arch \- architecture-specific information and control
|
||||||
.B /dev/iol
|
.B /dev/iol
|
||||||
.B /dev/iow
|
.B /dev/iow
|
||||||
.B /dev/irqalloc
|
.B /dev/irqalloc
|
||||||
.B /dev/mordor
|
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
This device presents textual information about PC hardware and allows
|
This device presents textual information about PC hardware and allows
|
||||||
user-level control of the I/O ports on x86-class and DEC Alpha machines.
|
user-level control of the I/O ports on x86-class and DEC Alpha machines.
|
||||||
|
@ -122,10 +121,6 @@ cause 8-bit wide, 16-bit wide, and 32-bit wide requests to
|
||||||
I/O ports.
|
I/O ports.
|
||||||
The port accessed is determined by the byte offset of the
|
The port accessed is determined by the byte offset of the
|
||||||
file descriptor.
|
file descriptor.
|
||||||
.PP
|
|
||||||
Reads and writes to
|
|
||||||
.IR mordor
|
|
||||||
will inevitably cause the front to fall off.
|
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
The following code reads from an x86 byte I/O port.
|
The following code reads from an x86 byte I/O port.
|
||||||
.IP
|
.IP
|
||||||
|
|
|
@ -334,6 +334,10 @@ the textual file descriptor number of a file or device on which to swap.
|
||||||
See
|
See
|
||||||
.IR swap (8).
|
.IR swap (8).
|
||||||
.PP
|
.PP
|
||||||
|
Reads and writes to
|
||||||
|
.IR mordor
|
||||||
|
will inevitably cause the front to fall off.
|
||||||
|
.PP
|
||||||
The other files served by the
|
The other files served by the
|
||||||
.I cons
|
.I cons
|
||||||
device are all single numbers:
|
device are all single numbers:
|
||||||
|
|
|
@ -987,20 +987,6 @@ archctlwrite(Chan*, void *a, long n, vlong)
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long
|
|
||||||
mordorread(Chan*, void*, long, vlong)
|
|
||||||
{
|
|
||||||
error("one does not simply read from mordor");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static long
|
|
||||||
mordorwrite(Chan*, void*, long, vlong)
|
|
||||||
{
|
|
||||||
error("one does not simply write into mordor");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
archinit(void)
|
archinit(void)
|
||||||
{
|
{
|
||||||
|
@ -1049,7 +1035,6 @@ archinit(void)
|
||||||
|
|
||||||
addarchfile("cputype", 0444, cputyperead, nil);
|
addarchfile("cputype", 0444, cputyperead, nil);
|
||||||
addarchfile("archctl", 0664, archctlread, archctlwrite);
|
addarchfile("archctl", 0664, archctlread, archctlwrite);
|
||||||
addarchfile("mordor", 0666, mordorread, mordorwrite);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -594,6 +594,7 @@ enum{
|
||||||
Qtime,
|
Qtime,
|
||||||
Quser,
|
Quser,
|
||||||
Qzero,
|
Qzero,
|
||||||
|
Qmordor,
|
||||||
Qconfig,
|
Qconfig,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -627,6 +628,7 @@ static Dirtab consdir[]={
|
||||||
"user", {Quser}, 0, 0666,
|
"user", {Quser}, 0, 0666,
|
||||||
"zero", {Qzero}, 0, 0444,
|
"zero", {Qzero}, 0, 0444,
|
||||||
"config", {Qconfig}, 0, 0444,
|
"config", {Qconfig}, 0, 0444,
|
||||||
|
"mordor", {Qmordor}, 0, 0666,
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -959,6 +961,10 @@ consread(Chan *c, void *buf, long n, vlong off)
|
||||||
memset(buf, 0, n);
|
memset(buf, 0, n);
|
||||||
return n;
|
return n;
|
||||||
|
|
||||||
|
case Qmordor:
|
||||||
|
error("one does not simply read from mordor");
|
||||||
|
return 0;
|
||||||
|
|
||||||
case Qosversion:
|
case Qosversion:
|
||||||
snprint(tmp, sizeof tmp, "2000");
|
snprint(tmp, sizeof tmp, "2000");
|
||||||
n = readstr((ulong)offset, buf, n, tmp);
|
n = readstr((ulong)offset, buf, n, tmp);
|
||||||
|
@ -1123,6 +1129,10 @@ conswrite(Chan *c, void *va, long n, vlong off)
|
||||||
kstrdup(&sysname, buf);
|
kstrdup(&sysname, buf);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Qmordor:
|
||||||
|
error("one does not simply write to mordor");
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
print("conswrite: %#llux\n", c->qid.path);
|
print("conswrite: %#llux\n", c->qid.path);
|
||||||
error(Egreg);
|
error(Egreg);
|
||||||
|
|
Loading…
Reference in a new issue