aboutsummaryrefslogtreecommitdiff
path: root/src/libplumb/mesg.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-11-23 18:16:51 +0000
committerrsc <devnull@localhost>2003-11-23 18:16:51 +0000
commitb7e6f4150f0974a3f3b145a23911b7c8a4b9399b (patch)
tree851e043b044f3dc40477454f1c3b5746b91a8eda /src/libplumb/mesg.c
parent58611a1bbf601c7f38c76421d3a3ece58bc56efb (diff)
downloadplan9port-b7e6f4150f0974a3f3b145a23911b7c8a4b9399b.tar.gz
plan9port-b7e6f4150f0974a3f3b145a23911b7c8a4b9399b.tar.bz2
plan9port-b7e6f4150f0974a3f3b145a23911b7c8a4b9399b.zip
make -> mk
use $HOME/mnt/plumb as named pipe.
Diffstat (limited to 'src/libplumb/mesg.c')
-rwxr-xr-xsrc/libplumb/mesg.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/libplumb/mesg.c b/src/libplumb/mesg.c
index 93ab03f6..ba80ef2a 100755
--- a/src/libplumb/mesg.c
+++ b/src/libplumb/mesg.c
@@ -4,28 +4,36 @@
static char attrbuf[4096];
+char *home;
+
int
plumbopen(char *name, int omode)
{
int fd, f;
char *s;
- char buf[128];
+ char buf[256];
if(name[0] == '/')
return open(name, omode);
- snprint(buf, sizeof buf, "/mnt/plumb/%s", name);
- fd = open(buf, omode);
+ if(home == nil){
+ home = getenv("HOME");
+ if(home == nil)
+ return -1;
+ }
+ snprint(buf, sizeof buf, "%s/mnt/plumb", home);
+/* fd = open(buf, omode);
if(fd >= 0)
return fd;
snprint(buf, sizeof buf, "/mnt/term/mnt/plumb/%s", name);
fd = open(buf, omode);
if(fd >= 0)
return fd;
- /* try mounting service */
+ /* try mounting service * /
s = getenv("plumbsrv");
if(s == nil)
return -1;
snprint(buf, sizeof buf, "/mnt/plumb/%s", name);
+*/
return open(buf, omode);
}