summaryrefslogtreecommitdiff
path: root/usr/src/cmd/backup/dump/dumptape.c
diff options
context:
space:
mode:
authorJim Rice <Jim.Rice@Sun.COM>2009-05-07 17:41:18 +0100
committerJim Rice <Jim.Rice@Sun.COM>2009-05-07 17:41:18 +0100
commitbf545727d6506df2bed889b1689857eeb24fe524 (patch)
treee28e31c6557dd28186a220212b33bf88726413b3 /usr/src/cmd/backup/dump/dumptape.c
parentfad6d4df081f6e18e75f1d52dba01da9b9ae41c9 (diff)
downloadillumos-gate-bf545727d6506df2bed889b1689857eeb24fe524.tar.gz
6761067 ufsdump may unlink files and directories
Diffstat (limited to 'usr/src/cmd/backup/dump/dumptape.c')
-rw-r--r--usr/src/cmd/backup/dump/dumptape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/cmd/backup/dump/dumptape.c b/usr/src/cmd/backup/dump/dumptape.c
index 5aa9aae652..39f09b35a7 100644
--- a/usr/src/cmd/backup/dump/dumptape.c
+++ b/usr/src/cmd/backup/dump/dumptape.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +31,6 @@
* under license from the Regents of the University of California.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include "dump.h"
#include <rmt.h>
#include <setjmp.h>
@@ -427,6 +425,8 @@ setuparchive(void)
/*NOTREACHED*/
}
+ archive_opened = 1;
+
if (lseek64(archivefd, lf_archoffset, 0) < 0) {
saverr = errno;
msg(gettext(
@@ -1694,7 +1694,7 @@ dumpabort()
else {
killall();
- if (archivefile)
+ if (archivefile && archive_opened)
(void) unlink(archivefile);
msg(gettext("The ENTIRE dump is aborted.\n"));
}