[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [MiNT] Hash filename for index
> Provided we find a decent algorithm (which will also work with
> potentially short strings) that hashes the filename (the "real" filename,
> i. e. with the correct case on case-preserving filesystems) into a 32-bit
> value we could avoid these problems at the risk of reporting a hard link
> with the merely theoretical chance of 1:2^32 (*). An application could
> even circumvent this problem by additionally checking the link count. If
> it is zero, the identical indices were reported erroneously.
>
> Comments? Which hash algorithm would be a good choice?
Actually, FATF32 already contains the code you are looking for. I think
however that currently it is commented out.