Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpuffs Remove pnode of overwritten file.
details: https://anonhg.NetBSD.org/src/rev/2c3ba2141dae
branches: trunk
changeset: 771520:2c3ba2141dae
user: manu <manu%NetBSD.org@localhost>
date: Thu Nov 24 01:55:33 2011 +0000
description:
Remove pnode of overwritten file.
When puffs_null_node_rename() overwrites existing file, its pnode
must?be removed, because src pnode already represents this file.
>From Evgeniy Ivanov <lolkaantimat%gmail.com@localhost>
diffstat:
lib/libpuffs/null.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 917185a4eaab -r 2c3ba2141dae lib/libpuffs/null.c
--- a/lib/libpuffs/null.c Thu Nov 24 01:54:08 2011 +0000
+++ b/lib/libpuffs/null.c Thu Nov 24 01:55:33 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $ */
+/* $NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $ */
/*
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#if !defined(lint)
-__RCSID("$NetBSD: null.c,v 1.30 2011/06/27 12:06:19 manu Exp $");
+__RCSID("$NetBSD: null.c,v 1.31 2011/11/24 01:55:33 manu Exp $");
#endif /* !lint */
/*
@@ -480,10 +480,14 @@
puffs_cookie_t targ_dir, puffs_cookie_t targ,
const struct puffs_cn *pcn_targ)
{
+ struct puffs_node *pn_targ = targ;
if (rename(PCNPATH(pcn_src), PCNPATH(pcn_targ)) == -1)
return errno;
+ if (pn_targ)
+ puffs_pn_remove(pn_targ);
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index