diff options
author | rsc <devnull@localhost> | 2006-06-25 23:55:37 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2006-06-25 23:55:37 +0000 |
commit | 1dc6e083c15e1580b02d30aa349821fe98fcf989 (patch) | |
tree | f826b95257210c7c1859385547db8c8b160262ff | |
parent | 70584625ae19b622a1dfe73181f2b0a083fea351 (diff) | |
download | plan9port-1dc6e083c15e1580b02d30aa349821fe98fcf989.tar.gz plan9port-1dc6e083c15e1580b02d30aa349821fe98fcf989.tar.bz2 plan9port-1dc6e083c15e1580b02d30aa349821fe98fcf989.zip |
plumbunmount
-rw-r--r-- | man/man3/plumb.3 | 17 | ||||
-rw-r--r-- | src/libplumb/fid.c | 13 |
2 files changed, 29 insertions, 1 deletions
diff --git a/man/man3/plumb.3 b/man/man3/plumb.3 index 970919ad..fa78a2b5 100644 --- a/man/man3/plumb.3 +++ b/man/man3/plumb.3 @@ -1,6 +1,6 @@ .TH PLUMB 3 .SH NAME -eplumb, plumbfree, plumbopen, plumbopenfid, plumbsend, plumbsendtofid, plumbsendtext, plumblookup, plumbpack, plumbpackattr, plumbaddattr, plumbdelattr, plumbrecv, plumbrecvfid, plumbunpack, plumbunpackpartial, plumbunpackattr, Plumbmsg \- plumb messages +eplumb, plumbfree, plumbopen, plumbunmount, plumbopenfid, plumbsend, plumbsendtofid, plumbsendtext, plumblookup, plumbpack, plumbpackattr, plumbaddattr, plumbdelattr, plumbrecv, plumbrecvfid, plumbunpack, plumbunpackpartial, plumbunpackattr, Plumbmsg \- plumb messages .SH SYNOPSIS .B #include <u.h> .br @@ -14,6 +14,9 @@ eplumb, plumbfree, plumbopen, plumbopenfid, plumbsend, plumbsendtofid, plumbsend int plumbopen(char *port, int omode) .PP .B +int plumbunmount(void) +.PP +.B int plumbsend(int fd, Plumbmsg *m) .PP .B @@ -117,6 +120,18 @@ registers, using the given receipt of messages from the named .IR port . .PP +The library mounts the +.IR plumber (4) +service on demand (using the +.IR 9pclient (3)) +library and reuses the mount instance for future +calls to +.IR plumbopen . +.I Plumbunmount +causes the library to discard its cached mount. +This can be useful if the plumber service itself has been +restarted and a client wishes to reconnect. +.PP .I Plumbsend formats and writes message .I m diff --git a/src/libplumb/fid.c b/src/libplumb/fid.c index cea5ce02..ec133c82 100644 --- a/src/libplumb/fid.c +++ b/src/libplumb/fid.c @@ -9,6 +9,19 @@ static int pfd = -1; static CFid *pfid; int +plumbunmount(void) +{ + CFsys *fsys; + + if(fsplumb){ + fsys = fsplumb; + fsplumb = nil; + fsunmount(fsys); + } + return 0; +} + +int plumbopen(char *name, int omode) { if(fsplumb == nil) |