aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <aelder@sgi.com>2009-11-25 18:18:45 -0600
committerAlex Elder <aelder@sgi.com>2009-11-25 18:18:45 -0600
commit10f672b1258c08f276e291b003b01e766cc281ea (patch)
treecb2d128a3dc321a0cefc513f5d1c0d92e55c0aa7
parentbad902e76bef3f8d592ba6fb9a30f290959d8cfe (diff)
downloadxfsdump-dev-10f672b1258c08f276e291b003b01e766cc281ea.tar.gz
Revert "3.0.3 release" and "use lpath_to_handle when restoring
symlinks" This reverts 2 commits that were published 2009-10-23 on oss.sgi.com: bad902e76bef3f8d592ba6fb9a30f290959d8cfe and 040e37332f4c86033fa9f84c95fbe04a4f89ff42 The state of the tree should now match this commit: cd1534881b1eb96b3eef6bb4d00b789cb31b18b8 Signed-off-by: Alex Elder <aelder@sgi.com>
-rw-r--r--VERSION2
-rw-r--r--build/rpm/xfsdump.spec.in2
-rw-r--r--doc/CHANGES4
-rw-r--r--restore/content.c55
4 files changed, 36 insertions, 27 deletions
diff --git a/VERSION b/VERSION
index b3a880e0..94c6a834 100644
--- a/VERSION
+++ b/VERSION
@@ -3,5 +3,5 @@
#
PKG_MAJOR=3
PKG_MINOR=0
-PKG_REVISION=3
+PKG_REVISION=2
PKG_BUILD=1
diff --git a/build/rpm/xfsdump.spec.in b/build/rpm/xfsdump.spec.in
index b4361d7e..1346dd06 100644
--- a/build/rpm/xfsdump.spec.in
+++ b/build/rpm/xfsdump.spec.in
@@ -3,7 +3,7 @@ Name: @pkg_name@
Version: @pkg_version@
Release: @pkg_release@
BuildRoot: @build_root@
-Requires: xfsprogs >= 3.0.5, attr >= 2.0.0
+Requires: xfsprogs >= 3.0.0, attr >= 2.0.0
Source: @pkg_name@-@pkg_version@.tar.gz
License: GPL
Vendor: Silicon Graphics, Inc.
diff --git a/doc/CHANGES b/doc/CHANGES
index dd8a7c6d..43106420 100644
--- a/doc/CHANGES
+++ b/doc/CHANGES
@@ -1,7 +1,3 @@
-xfsdump-3.0.3 (23 Oct 2009)
- - Now uses lpath_to_handle() when restoring symlinks, to avoid
- dangling links or links that refer to non-XFS file systems.
-
xfsdump-3.0.2 (9 May 2009)
- Update the Debian packaging and resolve xfsprogs dependencies.
diff --git a/restore/content.c b/restore/content.c
index 99549a8e..eb6e78c5 100644
--- a/restore/content.c
+++ b/restore/content.c
@@ -797,6 +797,7 @@ static void partial_reg(ix_t d_index, xfs_ino_t ino, off64_t fsize,
off64_t offset, off64_t sz);
static bool_t partial_check (xfs_ino_t ino, off64_t fsize);
static bool_t partial_check2 (partial_rest_t *isptr, off64_t fsize);
+static int do_fssetdm_by_handle( char *path, fsdmidata_t *fdmp);
static int quotafilecheck(char *type, char *dstdir, char *quotafile);
/* definition of locally defined global variables ****************************/
@@ -7894,28 +7895,14 @@ restore_symlink( drive_t *drivep,
}
if ( persp->a.restoredmpr) {
- fsdmidata_t fssetdm;
- void *hanp;
- size_t hlen=0;
-
- /* Restore DMAPI fields. */
- fssetdm.fsd_dmevmask = bstatp->bs_dmevmask;
- fssetdm.fsd_padding = 0;
- fssetdm.fsd_dmstate = bstatp->bs_dmstate;
+ fsdmidata_t fssetdm;
+
+ /* Restore DMAPI fields. */
- if (lpath_to_handle(persp->a.dstdir, path, &hanp, &hlen)) {
- mlog( MLOG_NORMAL | MLOG_WARNING, _(
- "lpath_to_handle of %s failed: %s\n"),
- path, strerror( errno ));
- } else {
- if (fssetdm_by_handle(hanp, hlen, &fssetdm)) {
- mlog( MLOG_NORMAL | MLOG_WARNING,
- _("fssetdm_by_handle of %s "
- "failed: %s\n"),
- path, strerror( errno ));
- }
- free_handle(hanp, hlen);
- }
+ fssetdm.fsd_dmevmask = bstatp->bs_dmevmask;
+ fssetdm.fsd_padding = 0;
+ fssetdm.fsd_dmstate = bstatp->bs_dmstate;
+ rval = do_fssetdm_by_handle(path, &fssetdm);
}
}
@@ -9538,6 +9525,32 @@ display_needed_objects( purp_t purp,
}
static int
+do_fssetdm_by_handle(
+ char *path,
+ fsdmidata_t *fdmp)
+{
+ void *hanp;
+ size_t hlen=0;
+ int rc;
+
+ if (path_to_handle(path, &hanp, &hlen)) {
+ mlog( MLOG_NORMAL | MLOG_WARNING, _(
+ "path_to_handle of %s failed:%s\n"),
+ path, strerror( errno ));
+ return -1;
+ }
+
+ rc = fssetdm_by_handle(hanp, hlen, fdmp);
+ free_handle(hanp, hlen);
+ if (rc) {
+ mlog( MLOG_NORMAL | MLOG_WARNING, _(
+ "fssetdm_by_handle of %s failed %s\n"),
+ path, strerror( errno ));
+ }
+ return rc;
+}
+
+static int
quotafilecheck(char *type, char *dstdir, char *quotafile)
{
struct stat s;