xfsprogs: metadump: some names aren't all that special
Move the check for short names out of is_special_dirent() and into
generate_obfuscated_name(). That way the check is more directly
associated with the algorithm that requires it.
Similarly, move the check for inode == 0, since that case has to do
with storing extended attributes (not files) in the name table.
As a result, is_special_dirent() is really only focused on whether a
given file is in the lost+found directory. Rename the function to
reflect its more specific purpose.
Updates (v3):
- The previous version did not properly skip the "lost+found"
directory itself; this one does.
- Created a new definition representing the name of the orphanage
directory. Encapsulate recognizing that directory into a new
macro, is_lost_found().
- Removed casts that eliminate a compile warning in calls to
libxfs_da_hashname(); will do them separately later if needed.
Updates (v4):
- Renamed is_lost_found() to be is_orphanage_dir(), and turned
it into an inline static function.
- Added parentheses around targets of the sizeof operation.
- Added a small bit of clarifying commentary in spots where
it was suggested.
Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>