From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrey mirtchovski To: 9fans@cse.psu.edu Subject: Re: [9fans] bind -c[ab] -- what am I doing wrong? In-Reply-To: <3F16E003.3040806@ameritech.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Thu, 17 Jul 2003 11:10:08 -0600 Topicbox-Message-UUID: fa3aae20-eacb-11e9-9e20-41e7f4b1d025 On Thu, 17 Jul 2003, northern snowfall wrote: > > Hope that helps! > well, it doesn't. what you describe is the bahaviour of the command according to the man page. but here's what I observe: plan9% touch kern/test # clearly I can write to it plan9% rm kern/test plan9% bind -ac /sys kern plan9% touch kern/test # but not anymore touch: kern/test: cannot create: permission denied plan9% plan9% unmount kern plan9% bind -ac kern /sys plan9% touch /sys/blah # this works as expected plan9% given the man page i expect 'bind -ac new /something/i/can/write/to' to allow me to continue to write to '/something/i/can/write/to'. in fact, I expect to be able to write to '/something/i/can/write/to' irregardless of whether it corresponds to 'new', 'old', is bound before or bound after a directory. the only case when I wouldn't expect to be able to write to it is when I'm not able to walk to it because of a bind -b earlier in the walk. in functional languages this technique is used as a formal proof of a program's correctness, observe this example from the haskell prelude: -- Minimal complete definition: (==) or (/=) x == y = not (x/=y) x /= y = not (x==y) a similar definition for 'bind' would be: bind -cb new old == bind -ca old new where, of course, we consider only the resulting directory, and not the path to it. andrey