Look in /dev/fs/9fat.
[rsc] --rwxrwxr-x M 374841 glenda sys 367 Nov 28 07:08 rc/bin/9fat:
/n/sourcesdump/2005/1128/plan9/rc/bin/9fat::1,7 -
/n/sourcesdump/2005/1129/plan9/rc/bin/9fat::1,7
#!/bin/rc
rfork e
- part=`{ls /dev/sd*/9fat >[2]/dev/null}
+ part=`{ls /dev/fs/9fat /dev/sd*/9fat >[2]/dev/null}
if(~ $#part 0) {
echo 'no 9fat partition found' >[1=2]
exit no.9fat
Add -A option.
[rsc] --rw-rw-r-- M 374841 glenda sys 3202 Nov 28 07:25 sys/man/4/import
/n/sourcesdump/2005/1128/plan9/sys/man/4/import:61,66 -
/n/sourcesdump/2005/1129/plan9/sys/man/4/import:61,70
.I file
is a directory.
.TP
+ .B -A
+ Skip the authentication protocol.
+ This is useful for connecting to foreign systems like Inferno.
+ .TP
.B -B
Run in ``backwards'' mode, described below.
.TP
[rsc] --rw-rw-r-- M 374841 glenda sys 7028 Nov 28 07:25 sys/src/cmd/import.c
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:23,28 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:23,29
char *aan = "/bin/aan";
AuthInfo *ai;
int debug;
+ int doauth = 1;
int connect(char*, char*, int);
int passive(void);
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:74,79 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:75,83
oldserver = 0;
mntflags = MREPL;
ARGBEGIN{
+ case 'A':
+ doauth = 0;
+ break;
case 'a':
mntflags = MAFTER;
break;
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:264,278 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:268,284
if((fd = dial(na, 0, dir, 0)) < 0)
sysfatal("can't dial %s: %r", system);
- if(oldserver)
- authp = "p9sk2";
- else
- authp = "p9any";
+ if(doauth){
+ if(oldserver)
+ authp = "p9sk2";
+ else
+ authp = "p9any";
+
+ ai = auth_proxy(fd, auth_getkey, "proto=%q role=client %s", authp, keyspec);
+ if(ai == nil)
+ sysfatal("%r: %s", system);
+ }
- ai = auth_proxy(fd, auth_getkey, "proto=%q role=client %s", authp, keyspec);
- if(ai == nil)
- sysfatal("%r: %s", system);
-
n = write(fd, tree, strlen(tree));
if(n < 0)
sysfatal("can't write tree: %r");
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:295,300 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:301,310
{
int fd;
+ /*
+ * Ignore doauth==0 on purpose. Is it useful here?
+ */
+
ai = auth_proxy(0, auth_getkey, "proto=p9any role=server");
if(ai == nil)
sysfatal("auth_proxy: %r");
/n/sourcesdump/2005/1128/plan9/sys/src/cmd/import.c:314,320 -
/n/sourcesdump/2005/1129/plan9/sys/src/cmd/import.c:324,330
void
usage(void)
{
- fprint(2, "usage: import [-abcC] [-E clear|ssl|tls] [-e 'crypt auth'|clear] [-k keypattern] [-p] host remotefs [mountpoint]\n");
+ fprint(2, "usage: import [-abcC] [-A] [-E clear|ssl|tls] [-e 'crypt auth'|clear] [-k keypattern] [-p] host remotefs [mountpoint]\n");
exits("usage");
}
Fix double-free.
[rsc] --rw-rw-r-- M 374841 glenda sys 16904 Nov 28 07:26 sys/src/lib9p/srv.c
/n/sourcesdump/2005/1128/plan9/sys/src/lib9p/srv.c:806,811 -
/n/sourcesdump/2005/1129/plan9/sys/src/lib9p/srv.c:806,813
for(i=0; i<r->nflush; i++)
respond(r->flush[i], nil);
free(r->flush);
+ r->flush = nil;
+ r->nflush = 0;
if(r->pool)
closereq(r);
Clean up plumbopen, try to create ports that don't exist.
[rsc] --rw-rw-r-- M 374841 glenda sys 7080 Nov 28 07:17 sys/src/libplumb/mesg.c
/n/sourcesdump/2005/1128/plan9/sys/src/libplumb/mesg.c:8,37 -
/n/sourcesdump/2005/1129/plan9/sys/src/libplumb/mesg.c:8,54
plumbopen(char *name, int omode)
{
int fd, f;
- char *s;
- char buf[128];
+ char *s, *plumber;
+ char buf[128], err[ERRMAX];
if(name[0] == '/')
return open(name, omode);
- snprint(buf, sizeof buf, "/mnt/plumb/%s", name);
+
+ /* find elusive plumber */
+ if(access("/mnt/plumb/send", OWRITE) >= 0)
+ plumber = "/mnt/plumb";
+ else if(access("/mnt/term/mnt/plumb/send", OWRITE) >= 0)
+ plumber = "/mnt/term/mnt/plumb";
+ else{
+ /* last resort: try mounting service */
+ plumber = "/mnt/plumb";
+ s = getenv("plumbsrv");
+ if(s == nil)
+ return -1;
+ f = open(s, ORDWR);
+ if(f < 0)
+ return -1;
+ if(mount(f, -1, "/mnt/plumb", MREPL, "") < 0){
+ close(f);
+ return -1;
+ }
+ if(access("/mnt/plumb/send", OWRITE) < 0)
+ return -1;
+ }
+
+ snprint(buf, sizeof buf, "%s/%s", plumber, name);
fd = open(buf, omode);
if(fd >= 0)
return fd;
- snprint(buf, sizeof buf, "/mnt/term/mnt/plumb/%s", name);
- fd = open(buf, omode);
+
+ /* try creating port; used by non-standard plumb implementations */
+ rerrstr(err, sizeof err);
+ fd = create(buf, omode, 0600);
if(fd >= 0)
return fd;
- /* try mounting service */
- s = getenv("plumbsrv");
- if(s == nil)
- return -1;
- f = open(s, ORDWR);
- if(f < 0)
- return -1;
- if(mount(f, -1, "/mnt/plumb", MREPL, "") < 0)
- return -1;
- snprint(buf, sizeof buf, "/mnt/plumb/%s", name);
- return open(buf, omode);
+ errstr(err, sizeof err);
+
+ return -1;
}
static int
Parse new /dev/swap.
[rsc] --rwxrwxr-x M 374841 rsc sys 1996 Nov 28 09:12 sys/lib/dist/pc/inst/fmtfossil
/n/sourcesdump/2005/1128/plan9/sys/lib/dist/pc/inst/fmtfossil:58,64 -
/n/sourcesdump/2005/1129/plan9/sys/lib/dist/pc/inst/fmtfossil:58,64
}
if(~ $do yes){
fossil/flfmt -y $f
- n=`{cat /dev/swap | sed 's/^[0-9]+\/([0-9]+) .*/\1/'}
+ n=`{cat /dev/swap | grep ' user' | sed 's/^[0-9]+\/([0-9]+) .*/\1/'}
if(test $n -gt 32768)
m=3000 # if have at least 128 user MB, use 24MB for fossil
if not if(test $n -gt 16384)
Cache size has already been determined.
[rsc] --rwxrwxr-x M 374841 rsc sys 2511 Nov 28 09:12 sys/lib/dist/pc/inst/mountfossil
/n/sourcesdump/2005/1128/plan9/sys/lib/dist/pc/inst/mountfossil:20,26 -
/n/sourcesdump/2005/1129/plan9/sys/lib/dist/pc/inst/mountfossil:20,26
if(! ps | grep -s ' fossil$'){
echo 'srv -p fscons' > /env/fossilconf
echo 'srv -AP fossil' >> /env/fossilconf
- fossil/conf $fossil | sed 's/^fsys main open .*/& -c 100 -AWVP/' |
+ fossil/conf $fossil | sed 's/^fsys main open .*/& -AWVP/' |
sed 's/^fsys main snaptime .*//' >> /env/fossilconf
if(! logprog fossil/fossil -c .' /env/fossilconf'>>[2]/srv/log){
echo 'fossil: '^$status
Better DMA handling.
[rsc] --rw-rw-r-- M 374841 glenda sys 2466 Nov 28 09:22 sys/lib/dist/pc/sub/termrc
/n/sourcesdump/2005/1128/plan9/sys/lib/dist/pc/sub/termrc:18,27 -
/n/sourcesdump/2005/1129/plan9/sys/lib/dist/pc/sub/termrc:18,27
for(disk in /dev/sd??) {
if(test -f $disk/data && test -f $disk/ctl){
disk/fdisk -p $disk/data >$disk/ctl >[2]/dev/null
- if(~ $#nosddma 0)
- echo dma on >$disk/ctl
- if(~ $#nosdrwm 0)
- echo rwm on >$disk/ctl
+ # if(~ $#nosddma 0)
+ # echo dma on >$disk/ctl
+ # if(~ $#nosdrwm 0)
+ # echo rwm on >$disk/ctl
}
}
/n/sourcesdump/2005/1128/plan9/sys/lib/dist/pc/sub/termrc:70,76 -
/n/sourcesdump/2005/1129/plan9/sys/lib/dist/pc/sub/termrc:70,76
if(~ $dmamode yes)
for(i in /dev/sd*/ctl)
if(test -f $i)
- {echo dma on; echo rwm on} >$i
+ {echo dma on; echo rwm on >[2]/dev/null} >$i
if(~ $installmode ask){
echo -n 'install mode is (text, graphics)[graphics]: '
Handle Voodoo 3dfx card.
[rsc] --rw-rw-r-- M 374841 glenda sys 3833 Nov 28 17:52 sys/src/9/pc/vga3dfx.c
[rsc] --rw-rw-r-- M 374841 glenda sys 13797 Nov 28 17:52 sys/src/9/pc/screen.c
/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/screen.c:454,459 -
/n/sourcesdump/2005/1129/plan9/sys/src/9/pc/screen.c:454,465
* Scan for largest memory region on card.
* Some S3 cards (e.g. Savage) have enormous
* mmio regions (but even larger frame buffers).
+ * Some 3dfx cards (e.g., Voodoo3) have mmio
+ * buffers the same size as the frame buffer,
+ * but only the frame buffer is marked as
+ * prefetchable (bar&8). If a card doesn't fit
+ * into these heuristics, its driver will have to
+ * call vgalinearaddr directly.
*/
best = -1;
for(i=0; i<nelem(p->mem); i++){
/n/sourcesdump/2005/1128/plan9/sys/src/9/pc/screen.c:461,467 -
/n/sourcesdump/2005/1129/plan9/sys/src/9/pc/screen.c:467,475
continue;
if(p->mem[i].size < 640*480) /* not big enough */
continue;
- if(best==-1 || p->mem[i].size > p->mem[best].size)
+ if(best==-1
+ || p->mem[i].size > p->mem[best].size
+ || (p->mem[i].size == p->mem[best].size && (p->mem[i].bar&8)))
best = i;
}
if(best >= 0){
[rsc] --rw-rw-r-- M 374841 glenda sys 3833 Nov 28 17:52 sys/src/9/pc/vga3dfx.c
|