[PATCH 02/12] xfsprogs: simplify leading '/' handling in generate_obfuscated_name()
Alex Elder
aelder at sgi.com
Mon Jan 10 14:23:57 CST 2011
On Mon, 2011-01-10 at 15:13 -0500, Christoph Hellwig wrote:
> On Thu, Dec 30, 2010 at 02:40:12PM -0600, Alex Elder wrote:
> > In generate_obfuscated_name(), the incoming file name is allowed to
> > start with a '/' character, in which case it is copied over to the
> > new file name and ignored for the remainder of the hash calculation.
> > Simplify the affected code by processing the '/' right away, and
> > using a pointer thereafter for the start of the new file name.
>
> The actual change looks good to me, but why would we ever have a /
> in the filename, and if we do why would we treat it special?
>
This change was preserving the behavior that was there before.
I didn't ask that question... It may well be that there's no
need to even handle a filename starting with '/', but I didn't
follow it back to see.
-Alex
More information about the xfs
mailing list