[OpenAFS-devel] AFS/DFS Mount points
Tom Keiser
Tom Keiser <tkeiser@gmail.com>
Mon, 11 Apr 2005 17:11:26 -0400
------=_Part_5401_12758564.1113253886903
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Apr 11, 2005 3:39 PM, Love <lha@stacken.kth.se> wrote:
>
> Tom Keiser <tkeiser@gmail.com> writes:
>
> > I've attached a small (preliminary) patch that makes things behave
> > more like DFS. It adds a new pioctl (VIOC_CREATE_MT_PT), and updates
> > fs.
>
> I've fine with the idea, just make the interface less complicated. Like two
> zero terminated strings.
>
> Love
>
hmm. that interface certainly was overcomplicated, and I'm blaming a
lack of sleep ;)
this better?
--
Tom Keiser
tkeiser@gmail.com
------=_Part_5401_12758564.1113253886903
Content-Type: application/octet-stream; name="mkmount-pioctl.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="mkmount-pioctl.patch"
ZGlmZiAtdU5yIG9wZW5hZnMtMS4zLjgxLWRpc3Qvc3JjL2Fmcy9WTk9QUy9hZnNfdm5vcF9zeW1s
aW5rLmMgb3BlbmFmcy0xLjMuODEtbWttb3VudC1waW9jdGwvc3JjL2Fmcy9WTk9QUy9hZnNfdm5v
cF9zeW1saW5rLmMKLS0tIG9wZW5hZnMtMS4zLjgxLWRpc3Qvc3JjL2Fmcy9WTk9QUy9hZnNfdm5v
cF9zeW1saW5rLmMJMjAwNS0wMS0zMCAyMjo0OToxNS4wMDAwMDAwMDAgLTA1MDAKKysrIG9wZW5h
ZnMtMS4zLjgxLW1rbW91bnQtcGlvY3RsL3NyYy9hZnMvVk5PUFMvYWZzX3Zub3Bfc3ltbGluay5j
CTIwMDUtMDQtMTEgMTA6Mzg6NDcuNzkyODQ0MjIzIC0wNDAwCkBAIC00OSw2ICs0OSwyNCBAQAog
ICAgICBzdHJ1Y3QgdmF0dHIgKmF0dHJzOwogICAgICBzdHJ1Y3QgQUZTX1VDUkVEICphY3JlZDsK
IHsKKyAgIC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