diff options
author | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2007-11-27 15:39:06 -0500 |
commit | 83ab7d88962d717ca5729e7337706b6e4da48af6 (patch) | |
tree | 2dcaeba8fec383733357f4db5e9c2d0718767838 /src/cmd | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
parent | 00a8743cd85fcb605a06382387ac526e7fe8bf36 (diff) | |
download | plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.gz plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.tar.bz2 plan9port-83ab7d88962d717ca5729e7337706b6e4da48af6.zip |
merge
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/9p.c | 2 | ||||
-rw-r--r-- | src/cmd/9pfuse/fuse.c | 11 | ||||
-rw-r--r-- | src/cmd/9pfuse/main.c | 19 | ||||
-rw-r--r-- | src/cmd/acme/cols.c | 9 | ||||
-rw-r--r-- | src/cmd/acme/look.c | 4 | ||||
-rw-r--r-- | src/cmd/upas/nfs/imap.c | 10 | ||||
-rw-r--r-- | src/cmd/upas/vf/unvf.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/diskcat.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/diskftp.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/disknfs.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/vbackup.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/vcat.c | 2 | ||||
-rw-r--r-- | src/cmd/vbackup/vftp.c | 2 |
13 files changed, 47 insertions, 22 deletions
diff --git a/src/cmd/9p.c b/src/cmd/9p.c index 1befa6b0..2e70399e 100644 --- a/src/cmd/9p.c +++ b/src/cmd/9p.c @@ -538,7 +538,7 @@ xls(int argc, char **argv) } if(sort) qsort(d, n, sizeof d[0], dircmp); - for(j=0; j<5; j++) + for(j=0; j<4; j++) len[j] = 0; for(i=0; i<n; i++){ d[i].type = 'M'; diff --git a/src/cmd/9pfuse/fuse.c b/src/cmd/9pfuse/fuse.c index b1210b7b..e78bae88 100644 --- a/src/cmd/9pfuse/fuse.c +++ b/src/cmd/9pfuse/fuse.c @@ -804,6 +804,8 @@ mountfuse(char *mtpt) "/Contents/Resources/load_fusefs", 0) < 0 && access(f="/Library/Extensions/fusefs.kext" "/Contents/Resources/load_fusefs", 0) < 0 && + access(f="/Library/Filesystems" + "/fusefs.fs/Support/load_fusefs", 0) < 0 && access(f="/System/Library/Filesystems" "/fusefs.fs/Support/load_fusefs", 0) < 0){ werrstr("cannot find load_fusefs"); @@ -843,8 +845,15 @@ mountfuse(char *mtpt) /* * Different versions of MacFUSE put the * mount_fusefs binary in different places. - * Try both. + * Try all. */ + /* Leopard location */ + putenv("MOUNT_FUSEFS_DAEMON_PATH", + "/Library/Filesystems/fusefs.fs/Support/mount_fusefs"); + execl("/Library/Filesystems/fusefs.fs/Support/mount_fusefs", + "mount_fusefs", buf, mtpt, nil); + + /* possible Tiger locations */ execl("/System/Library/Filesystems/fusefs.fs/mount_fusefs", "mount_fusefs", buf, mtpt, nil); execl("/System/Library/Filesystems/fusefs.fs/Support/mount_fusefs", diff --git a/src/cmd/9pfuse/main.c b/src/cmd/9pfuse/main.c index 82d7b1fe..50c835bb 100644 --- a/src/cmd/9pfuse/main.c +++ b/src/cmd/9pfuse/main.c @@ -22,12 +22,21 @@ #ifndef O_DIRECTORY #define O_DIRECTORY 0 #endif + #ifndef O_LARGEFILE -#if defined(__linux__) -#define O_LARGEFILE 0100000 /* Sigh */ -#else -#define O_LARGEFILE 0 +# if defined(__linux__) +# define O_LARGEFILE 0100000 /* Sigh */ +# else +# define O_LARGEFILE 0 +# endif #endif + +#ifndef O_CLOEXEC +# if defined(__linux__) +# define O_CLOEXEC 02000000 /* Sigh */ +# else +# define O_CLOEXEC 0 +# endif #endif @@ -552,7 +561,7 @@ _fuseopen(FuseMsg *m, int isdir) flags = in->flags; openmode = flags&3; flags &= ~3; - flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE); + flags &= ~(O_DIRECTORY|O_NONBLOCK|O_LARGEFILE|O_CLOEXEC); if(flags & O_TRUNC){ openmode |= OTRUNC; flags &= ~O_TRUNC; diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c index 3ac780b1..31b2780f 100644 --- a/src/cmd/acme/cols.c +++ b/src/cmd/acme/cols.c @@ -534,11 +534,12 @@ colwhich(Column *c, Point p) for(i=0; i<c->nw; i++){ w = c->w[i]; if(ptinrect(p, w->r)){ - if(ptinrect(p, w->tagtop) || ptinrect(p, w->tag.fr.r)) + if(ptinrect(p, w->tagtop) || ptinrect(p, w->tag.all)) return &w->tag; - if(ptinrect(p, w->body.scrollr) || ptinrect(p, w->body.fr.r)) - return &w->body; - return nil; + /* exclude partial line at bottom */ + if(p.x >= w->body.scrollr.max.x && p.y >= w->body.fr.r.max.y) + return nil; + return &w->body; } } return nil; diff --git a/src/cmd/acme/look.c b/src/cmd/acme/look.c index db699274..66c6c664 100644 --- a/src/cmd/acme/look.c +++ b/src/cmd/acme/look.c @@ -365,11 +365,11 @@ search(Text *ct, Rune *r, uint n) fbuffree(s); return TRUE; } - if(around && q>=ct->q1) - break; --nb; b++; q++; + if(around && q>=ct->q1) + break; } fbuffree(s); return FALSE; diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c index 0a93b6b5..64ffeb17 100644 --- a/src/cmd/upas/nfs/imap.c +++ b/src/cmd/upas/nfs/imap.c @@ -569,13 +569,19 @@ int imapcopylist(Imap *z, char *nbox, Msg **m, uint nm) { int rv; - char *name; + char *name, *p; if(nm == 0) return 0; qlock(&z->lk); - name = esmprint("%Z", nbox); + if(strcmp(nbox, "mbox") == 0) + name = estrdup("INBOX"); + else{ + p = esmprint("%s%s", z->root, nbox); + name = esmprint("%Z", p); + free(p); + } rv = imaplistcmd(z, m[0]->box, "UID COPY", m, nm, name); free(name); qunlock(&z->lk); diff --git a/src/cmd/upas/vf/unvf.c b/src/cmd/upas/vf/unvf.c index 92af6bfb..aecbca62 100644 --- a/src/cmd/upas/vf/unvf.c +++ b/src/cmd/upas/vf/unvf.c @@ -24,7 +24,7 @@ main(void) while((p = Brdstr(&b, '\n', 1)) != nil){ if(p[0] == 0) break; - if(strncmp(p, "Content-Transfer-Encoding: ", 27) == 0) + if(cistrncmp(p, "Content-Transfer-Encoding: ", 27) == 0) encoding = strdup(p+27); free(p); } diff --git a/src/cmd/vbackup/diskcat.c b/src/cmd/vbackup/diskcat.c index 92586890..bab11762 100644 --- a/src/cmd/vbackup/diskcat.c +++ b/src/cmd/vbackup/diskcat.c @@ -33,7 +33,7 @@ main(int argc, char **argv) if((disk = diskcache(disk, 16384, 16)) == nil) sysfatal("diskcache: %r"); if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); zero = emalloc(fsys->blocksize); fprint(2, "%d blocks total\n", fsys->nblock); diff --git a/src/cmd/vbackup/diskftp.c b/src/cmd/vbackup/diskftp.c index bf586624..33d278b5 100644 --- a/src/cmd/vbackup/diskftp.c +++ b/src/cmd/vbackup/diskftp.c @@ -72,7 +72,7 @@ threadmain(int argc, char **argv) if((disk = diskcache(disk, 16384, 16)) == nil) sysfatal("diskcache: %r"); if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); allowall = 1; memset(&au, 0, sizeof au); diff --git a/src/cmd/vbackup/disknfs.c b/src/cmd/vbackup/disknfs.c index 8ad4ffb7..b51d0a3b 100644 --- a/src/cmd/vbackup/disknfs.c +++ b/src/cmd/vbackup/disknfs.c @@ -67,7 +67,7 @@ threadmain(int argc, char **argv) sysfatal("diskcache: %r"); if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); nfs3chan = chancreate(sizeof(SunMsg*), 0); mountchan = chancreate(sizeof(SunMsg*), 0); diff --git a/src/cmd/vbackup/vbackup.c b/src/cmd/vbackup/vbackup.c index 67d2b9b5..d027f351 100644 --- a/src/cmd/vbackup/vbackup.c +++ b/src/cmd/vbackup/vbackup.c @@ -164,7 +164,7 @@ threadmain(int argc, char **argv) if((disk = diskcache(disk, 32768, 2*MAXQ+16)) == nil) sysfatal("diskcache: %r"); if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); /* * connect to venti diff --git a/src/cmd/vbackup/vcat.c b/src/cmd/vbackup/vcat.c index 01320fbd..0346963b 100644 --- a/src/cmd/vbackup/vcat.c +++ b/src/cmd/vbackup/vcat.c @@ -52,7 +52,7 @@ threadmain(int argc, char **argv) if((disk = diskopenventi(c, score)) == nil) sysfatal("diskopenventi: %r"); if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); zero = emalloc(fsys->blocksize); fprint(2, "%d blocks total\n", fsys->nblock); diff --git a/src/cmd/vbackup/vftp.c b/src/cmd/vbackup/vftp.c index c9dd4948..90af42e5 100644 --- a/src/cmd/vbackup/vftp.c +++ b/src/cmd/vbackup/vftp.c @@ -418,7 +418,7 @@ threadmain(int argc, char **argv) sysfatal("diskopenventi: %r"); } if((fsys = fsysopen(disk)) == nil) - sysfatal("ffsopen: %r"); + sysfatal("fsysopen: %r"); fprint(2, "block size %d\n", fsys->blocksize); buf = emalloc(fsys->blocksize); |