From 1ddd247c33ea7275d59aea4d9c12452003e115de Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 16 Apr 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-04-16 --- port/chan.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/port/chan.c b/port/chan.c index da75c143c617164238d82606aa9a6f6782bd2e3f..611725e17ddfdbe835cba35118e17894e9d0f6f9 100644 --- a/port/chan.c +++ b/port/chan.c @@ -530,8 +530,11 @@ namec(char *name, int amode, int omode, ulong perm) name = nextelem(name, elem); - if(mntok && !isdot) - if(!(amode==Amount && elem[0]==0)) /* don't domount on slash */ + /* + * If mounting, don't follow the mount entry for root or the + * current directory. + */ + if(mntok && !isdot && !(amode==Amount && elem[0]==0)) c = domount(c); /* see case Atodir below */ /* @@ -548,7 +551,6 @@ namec(char *name, int amode, int omode, ulong perm) /* * Last element; act according to type of access. */ - switch(amode){ case Aaccess: if(isdot)