summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-08-13 22:20:01 +0200
committercinap_lenrek <cinap_lenrek@localhost>2011-08-13 22:20:01 +0200
commite0c3754a3d3b7267885bae205831267ef1b4830a (patch)
tree8c56000383e88ee98f181f609578001569518ef0
parent31cf34ca81d31c9e76998da1ebea41dd819f20f9 (diff)
downloadplan9front-e0c3754a3d3b7267885bae205831267ef1b4830a.tar.xz
add shr(3) manpage
-rw-r--r--sys/man/3/shr49
1 files changed, 49 insertions, 0 deletions
diff --git a/sys/man/3/shr b/sys/man/3/shr
new file mode 100644
index 000000000..e395e2155
--- /dev/null
+++ b/sys/man/3/shr
@@ -0,0 +1,49 @@
+.TH SHR 3
+.SH NAME
+shr \- global mountpoints
+.SH SYNOPSIS
+.nf
+.B bind -a '#σ/share' /dev
+
+.BI #σ/ share1
+.BI #σc/ share1/service1
+.BI #σc/ share1/service2
+ ...
+.fi
+.SH DESCRIPTION
+The
+.I shr
+device provides global mountpoints in the form of share directories
+where 9p services can be mounted and unmounted dynamically.
+
+Effectively, it is a global mountpoint registry that is separate from
+private namespaces.
+.PP
+The
+.I shr
+device exports a mount tree and a control tree. The directories
+in the mount tree
+.BI #σ
+are the share mountpoints themselve and in the control tree
+.BI #σc
+share directories can be created or removed.
+.PP
+To create a new share, create the directory
+.B #σc/myshare
+
+To mount a service in that share, create the file
+.B #σc/myshare/myserv
+and then write a text string (suitable for
+.IR strtoul ;
+see
+.IR atof (2))
+giving the file descriptor number of an open 9p service. Any process
+with the proper permission may then access
+.B #σ/myshare
+to use the service.
+.PP
+Multiple services can be mounted under a share. New services get
+mounted before old ones. Removing the service file from a share
+removes the service as soon as the last reference goes away.
+.SH SOURCE
+.B /sys/src/9/port/devshr.c