Skip to contentSkip to conversation

xfsdump: fix restore of ext attrs on root directory

PATCH In review Bill Kendall 2 participants 2 messages Jan 6, 2012 – Jan 11, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsdump: fix restore of ext attrs on root directory

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 ".".

---
 restore/tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
restore/tree.c +1 -1
index afe7042..bb5df06 100644
@@ -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 );
Signature · 6 lines
1.7.0.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Bill Kendall

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 ".".

---
 restore/tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Looks good,

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs