summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormishra <none@none>2006-09-18 14:00:56 -0700
committermishra <none@none>2006-09-18 14:00:56 -0700
commitd11200d12d856cee89b917790f31062907110834 (patch)
treedd9700a0c50f6cda8c8134cfbae8a722be15d21d
parentfe2f476a78f63879c77fc29e41519eea3354941c (diff)
downloadillumos-gate-d11200d12d856cee89b917790f31062907110834.tar.gz
6438911 ufsrestore has troubles with modified files in a incremental dump
-rw-r--r--usr/src/cmd/backup/restore/restore.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/src/cmd/backup/restore/restore.c b/usr/src/cmd/backup/restore/restore.c
index c9f0e60853..2a0b67dfd4 100644
--- a/usr/src/cmd/backup/restore/restore.c
+++ b/usr/src/cmd/backup/restore/restore.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -329,10 +329,13 @@ nodeupdates(name, ino, type)
*/
case ONTAPE|NAMEFND:
case ONTAPE|NAMEFND|MODECHG:
- if (lookuptype == LINK) {
+ if (lookuptype == LINK || key == (ONTAPE|NAMEFND)) {
removeleaf(np);
freeentry(np);
} else {
+ /*
+ * Create a temporary node only if MODECHG.
+ */
mktempname(np);
}
/*FALLTHROUGH*/
@@ -398,7 +401,10 @@ nodeupdates(name, ino, type)
* A previously known file which is to be updated.
*/
case ONTAPE|INOFND|NAMEFND:
- if (type == LEAF && lookuptype != LINK) {
+ /*
+ * Extract leaf nodes.
+ */
+ if (type == LEAF) {
/* LINTED: result fits into a short */
np->e_flags |= EXTRACT;
}