Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs support lookup of pathname componen...



details:   https://anonhg.NetBSD.org/src/rev/170253221452
branches:  trunk
changeset: 749461:170253221452
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Nov 30 10:11:09 2009 +0000

description:
support lookup of pathname component "."

diffstat:

 sys/rump/librump/rumpvfs/rumpfs.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 3ac3854c4409 -r 170253221452 sys/rump/librump/rumpvfs/rumpfs.c
--- a/sys/rump/librump/rumpvfs/rumpfs.c Mon Nov 30 10:03:57 2009 +0000
+++ b/sys/rump/librump/rumpvfs/rumpfs.c Mon Nov 30 10:11:09 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpfs.c,v 1.31 2009/11/27 16:43:51 pooka Exp $        */
+/*     $NetBSD: rumpfs.c,v 1.32 2009/11/30 10:11:09 pooka Exp $        */
 
 /*
  * Copyright (c) 2009  Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.31 2009/11/27 16:43:51 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpfs.c,v 1.32 2009/11/30 10:11:09 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -434,8 +434,13 @@
                return EOPNOTSUPP;
        if (!((cnp->cn_flags & ISDOTDOT) == 0))
                return EOPNOTSUPP;
-       if (!(cnp->cn_namelen != 0 && cnp->cn_pnbuf[0] != '.'))
-               return EOPNOTSUPP;
+
+       /* check for dot, return directly if the case */
+       if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+               vref(dvp);
+               *vpp = dvp;
+               goto out;
+       }
 
        /* check if we are returning a faked block device */
        if (dvp == rootvnode && cnp->cn_nameiop == LOOKUP) {
@@ -485,6 +490,7 @@
                        return rv;
        }
 
+ out:
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index