]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: metadump: move duplicate name handling into its own function
authorAlex Elder <aelder@sgi.com>
Fri, 25 Feb 2011 18:13:48 +0000 (18:13 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 8 Mar 2011 18:04:42 +0000 (12:04 -0600)
commitfcb63670531b07a1d58f00ba354c923d63ef38c3
tree9407bb074c4ecd5362cf559e4480c207d34b7674
parent002c6e02955452b4c288ccfd478f92534dc62bb7
xfsprogs: metadump: move duplicate name handling into its own function

Move the handling of duplicate names into its own function.  As a
result, all names other than "lost+found" files (not just those that
get obfuscated) will be checked to avoid duplication.

This makes the local buffer newname[] in generate_obfuscated_name()
unnecessary, so just drop it and use the passed-in name.

Updates:
- A comment about handling of a leading '/' character is now modified
  to match the updated code, rather than being deleted altogether.
- Renamed handle_duplicates() to be handle_duplicate_name().

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
db/metadump.c