Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/puffs/h_dtfs * remove target node from right directory



details:   https://anonhg.NetBSD.org/src/rev/6a815e221ad2
branches:  trunk
changeset: 756367:6a815e221ad2
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jul 14 16:59:35 2010 +0000

description:
* remove target node from right directory
* remove what i guess to be a useless if-clause (although with
  file systems you can never be sure)

diffstat:

 tests/fs/puffs/h_dtfs/dtfs_vnops.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r c12414af86d7 -r 6a815e221ad2 tests/fs/puffs/h_dtfs/dtfs_vnops.c
--- a/tests/fs/puffs/h_dtfs/dtfs_vnops.c        Wed Jul 14 16:03:49 2010 +0000
+++ b/tests/fs/puffs/h_dtfs/dtfs_vnops.c        Wed Jul 14 16:59:35 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dtfs_vnops.c,v 1.3 2010/07/14 14:22:15 pooka Exp $     */
+/*     $NetBSD: dtfs_vnops.c,v 1.4 2010/07/14 16:59:35 pooka Exp $     */
 
 /*
  * Copyright (c) 2006  Antti Kantee.  All Rights Reserved.
@@ -319,10 +319,6 @@
        dfd_src = dtfs_dirgetbyname(DTFS_PTOF(pn_sdir),
            pcn_src->pcn_name, pcn_src->pcn_namelen);
 
-       /* asked for "." or ".." XXX: make sure? */
-       if (!dfd_src)
-               return EINVAL;
-
        /* if there's a target file, nuke it for atomic replacement */
        if (pn_tfile) {
                if (pn_tfile->pn_va.va_type == VDIR) {
@@ -330,7 +326,7 @@
                        if (!LIST_EMPTY(&df_targ->df_dirents))
                                return ENOTEMPTY;
                }
-               dtfs_nukenode(pn_tfile, pn_sdir,
+               dtfs_nukenode(pn_tfile, pn_tdir,
                    pcn_targ->pcn_name, pcn_targ->pcn_namelen);
        }
 



Home | Main Index | Thread Index | Old Index