ref: bf7d306934a74eb243fbebc5d1c2dfd71610e8c9
parent: 1349cf6174d0808febc6d7d19e5c9d510ccb61dc
author: cinap_lenrek <cinap_lenrek@rei2.9hal>
date: Mon Feb 6 22:29:58 EST 2012
bring manpage and debug code of exportfs -P closer to reality
--- a/sys/man/4/exportfs
+++ b/sys/man/4/exportfs
@@ -126,7 +126,7 @@
to be matched against path names
relative to the current working directory
and starting with
-.BR ./ .
+.BR / .
For a file to be exported, all lines with a prefix
.B +
must match and all those with prefix
@@ -204,7 +204,7 @@
.IP
.EX
cd /n/dump
-echo '+ ^\e.(/2003(/10..(/usr(/glenda/?)?)?)?)?' > /tmp/pattern
+echo '+ ^/(2003(/10..(/usr(/glenda/?)?)?)?)?' > /tmp/pattern
echo '- \e.(aes|pgp)$' >> /tmp/pattern
exportfs -P /tmp/pattern
.EE
--- a/sys/src/cmd/exportfs/pattern.c
+++ b/sys/src/cmd/exportfs/pattern.c
@@ -80,16 +80,16 @@
else
p = path+1;
- DEBUG(DFD, "checking %s\n", path);
+ DEBUG(DFD, "checking %s\n", p);
for(re = include; *re != nil; re++){ if(regexec(*re, p, nil, 0) != 1){- DEBUG(DFD, "excluded+ %s\n", path);
+ DEBUG(DFD, "excluded+ %s\n", p);
return -1;
}
}
for(re = exclude; *re != nil; re++){ if(regexec(*re, p, nil, 0) == 1){- DEBUG(DFD, "excluded- %s\n", path);
+ DEBUG(DFD, "excluded- %s\n", p);
return -1;
}
}
--
⑨