+ if (a->device != b->device)
+ return a->device < b->device ? -1 : 1;
+ else if (a->inode != b->inode)
+ return a->inode < b->inode ? -1 : 1;
+ else if (a->name != NULL)
+ return b->name != NULL ? strcmp (a->name, b->name) : 1;
+ else
+ return b->name != NULL ? -1 : 0;
+}
+
+/* Returns a hash value for IDENTITY. */
+unsigned int
+fn_hash_identity (const struct file_identity *identity)
+{
+ unsigned int hash = identity->device ^ identity->inode;
+ if (identity->name != NULL)
+ hash ^= hsh_hash_string (identity->name);
+ return hash;