]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/3/shr
arch(3): document msr
[plan9front.git] / sys / man / 3 / shr
index e395e215558f98e6c461afa0e6f6bcf38e957457..e9b5da361974a534dffeed9e7ae9fae68ca60d33 100644 (file)
@@ -3,7 +3,7 @@
 shr \- global mountpoints
 .SH SYNOPSIS
 .nf
-.B bind -a '#σ/share' /dev
+.B bind '#σ' /shr
 
 .BI #σ/ share1
 .BI #σc/ share1/service1
@@ -14,19 +14,22 @@ shr \- global mountpoints
 The
 .I shr
 device provides global mountpoints in the form of share directories
-where 9p services can be mounted and unmounted dynamically.
+where
+.IR 9P
+services can be mounted.
 
 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
+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
+are the share mountpoints themselves, while the directories in
 .BI #σc
-share directories can be created or removed.
+contain the service files of the share.
 .PP
 To create a new share, create the directory
 .B #σc/myshare
@@ -37,13 +40,26 @@ 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
+giving the file descriptor number of an open
+.I 9P
+service.  Any process
 with the proper permission may then access
 .B #σ/myshare
-to use the service.
+on the mount tree.
 .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.
+The service file can be reopened and passed to
+.IR mount
+(see
+.IR bind (2))
+or added to another share.
+.PP
+Multiple services can be mounted under a share forming a union
+directory. New services get mounted before old ones.
+Removing the service file unmounts the service from the share.
+.PP
+Creating shares and mounts requires read-write access in the share
+directory. The special user
+.B none
+is prohibited from these operations.
 .SH SOURCE
 .B /sys/src/9/port/devshr.c