From d970ed6a5a243c2ec69857b69382b79eaaad1e87 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 7 Feb 2012 03:29:58 +0100 Subject: [PATCH] bring manpage and debug code of exportfs -P closer to reality --- sys/man/4/exportfs | 4 ++-- sys/src/cmd/exportfs/pattern.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/man/4/exportfs b/sys/man/4/exportfs index 649e0444b..b7cbeb979 100644 --- a/sys/man/4/exportfs +++ b/sys/man/4/exportfs @@ -126,7 +126,7 @@ contains one regular expression per line, 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 @@ To export the archive of one user for one month, except for secrets, .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 diff --git a/sys/src/cmd/exportfs/pattern.c b/sys/src/cmd/exportfs/pattern.c index 0dcbc9380..91abfd755 100644 --- a/sys/src/cmd/exportfs/pattern.c +++ b/sys/src/cmd/exportfs/pattern.c @@ -80,16 +80,16 @@ excludefile(char *path) 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; } }