Source-Changes-HG archive

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

[src/trunk]: src/sys/fs/tmpfs return same errno as ffs



details:   https://anonhg.NetBSD.org/src/rev/c12414af86d7
branches:  trunk
changeset: 756366:c12414af86d7
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jul 14 16:03:49 2010 +0000

description:
return same errno as ffs

diffstat:

 sys/fs/tmpfs/tmpfs_vnops.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 3667b1394082 -r c12414af86d7 sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c        Wed Jul 14 14:42:40 2010 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c        Wed Jul 14 16:03:49 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tmpfs_vnops.c,v 1.72 2010/07/02 03:29:47 rmind Exp $   */
+/*     $NetBSD: tmpfs_vnops.c,v 1.73 2010/07/14 16:03:49 pooka Exp $   */
 
 /*
  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.72 2010/07/02 03:29:47 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.73 2010/07/14 16:03:49 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/dirent.h>
@@ -179,6 +179,11 @@
                goto done;
 
        } else if (cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.') {
+               if ((cnp->cn_flags & ISLASTCN) &&
+                   (cnp->cn_nameiop == RENAME)) {
+                       error = EISDIR;
+                       goto out;
+               }
                vref(dvp);
                *vpp = dvp;
                error = 0;



Home | Main Index | Thread Index | Old Index