xfs
[Top] [All Lists]

[PATCH] xfsdump: fix restore of ext attrs on root directory

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfsdump: fix restore of ext attrs on root directory
From: Bill Kendall <wkendall@xxxxxxx>
Date: Fri, 6 Jan 2012 14:51:56 -0600
Cc: Bill Kendall <wkendall@xxxxxxx>
xfsrestore fails to restore extended attributes on the root directory
because Node2path(), which returns a pathname relative to the restore
root, returns an empty string instead of ".".

Signed-off-by: Bill Kendall <wkendall@xxxxxxx>
---
 restore/tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/restore/tree.c b/restore/tree.c
index afe7042..bb5df06 100644
--- a/restore/tree.c
+++ b/restore/tree.c
@@ -3450,7 +3450,7 @@ static bool_t
 Node2path( nh_t nh, char *path, char *errmsg )
 {
        intgen_t remainingcnt;
-       path[ 0 ] = 0; /* in case root node passed in */
+       strcpy(path, "."); /* in case root node passed in */
        remainingcnt = Node2path_recurse( nh, path, MAXPATHLEN, 0 );
        if ( remainingcnt <= 0 ) {
                node_t *np = Node_map( nh );
-- 
1.7.0.4

<Prev in Thread] Current Thread [Next in Thread>