On Thursday, 15 September 2016 23:16:42 CEST Matteo Cafasso wrote:
+/* Find inode, it gets called on every FS node.
+ * If the FS node address is the given one, parse it,
+ * encode it into an XDR structure and send it to the library.
+ * Return TSK_WALK_CONT on success, TSK_WALK_ERROR on error.
+ */
+static TSK_WALK_RET_ENUM
+findino_callback (TSK_FS_FILE *fsfile, const char *path, void *data)
+{
+ int ret = 0;
+ uint64_t *inode = (uint64_t *) data;
+
+ if (entry_is_dot (fsfile))
+ return TSK_WALK_CONT;
+
+ if (*inode != fsfile->name->meta_addr)
+ return TSK_WALK_CONT;
I guess this condition will be more critical in excluding the inodes
that are not wanted (all but the requested), and it should be fast
(since it's a simple comparison of uint64_t); hence I would do this
before the entry_is_dot one.
LGTM otherwise.
Thanks,
--
Pino Toscano