This commit is contained in:
Russ Cox 2005-11-04 17:06:57 +00:00
parent 3f22e19560
commit 9f66cd80b3
3 changed files with 39 additions and 25 deletions

View File

@ -1,7 +1,7 @@
# Unix
AR=ar
AS=as
CC=gcc
CC=gcc -Wall
RANLIB=ranlib
CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -ggdb -D_THREAD_SAFE -pthread # not ready for this yet: -Wall
O=o

10
README
View File

@ -23,9 +23,13 @@ See http://swtch.com/drawterm/
TO DO:
------
- Drawterm seems to have ssl synchronization problems.
Specifically, fcp bigfile /mnt/term/tmp reliably wedges it.
- Should clean up the code so that gcc -Wall doesn't print
any warnings.
- Should import latest /dev/draw to allow resize of window
- Should copy 9term code and make console window a real
9term window instead.
- Should implement /dev/label.

34
cpu.c
View File

@ -82,6 +82,25 @@ usage(void)
}
int fdd;
int
mountfactotum(void)
{
int fd;
if((fd = dialfactotum()) < 0)
return;
if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0){
fprint(2, "mount factotum: %r\n");
return;
}
if((fd = open("/mnt/factotum/ctl", OREAD)) < 0){
fprint(2, "open /mnt/factotum/ctl: %r\n");
return;
}
close(fd);
return 0;
}
void
cpumain(int argc, char **argv)
{
@ -140,19 +159,10 @@ cpumain(int argc, char **argv)
usage();
}ARGEND;
if((fd = dialfactotum()) < 0)
fprint(2, "dial factotum: %r\n");
else if(sysmount(fd, -1, "/mnt/factotum", MREPL, "") < 0)
fprint(2, "mount factotum: %r\n");
else if((fd = open("/mnt/factotum/ctl", OREAD)) < 0)
fprint(2, "open /mnt/factotum/ctl: %r\n");
else
close(fd);
if(mountfactotum() < 0){
if(secstoreserver == nil)
secstoreserver = authserver;
if(secstoreserver && havesecstore(secstoreserver, user)){
if(havesecstore(secstoreserver, user)){
s = secstorefetch(secstoreserver, user, nil);
if(s){
if(strlen(s) >= sizeof secstorebuf)
@ -160,7 +170,7 @@ cpumain(int argc, char **argv)
strcpy(secstorebuf, s);
}
}
}
if(argc != 0)
usage();