Index: lib/xvfs/xvfs.c.rvt ================================================================== --- lib/xvfs/xvfs.c.rvt +++ lib/xvfs/xvfs.c.rvt @@ -93,10 +93,16 @@ } /* * Use user-supplied inode, or look up the path */ + if (inode != XVFS_INODE_NULL) { + if (inode >= || inode < 0) { + inode = XVFS_INODE_NULL; + path = NULL; + } + } if (inode == XVFS_INODE_NULL) { /* * Get the inode from the lookup function */ inode = xvfs__nameToIndex(path); @@ -143,10 +149,16 @@ /* * Use user-supplied inode, or look up the path */ + if (inode != XVFS_INODE_NULL) { + if (inode >= || inode < 0) { + inode = XVFS_INODE_NULL; + path = NULL; + } + } if (inode == XVFS_INODE_NULL) { /* * Get the inode from the lookup function */ inode = xvfs__nameToIndex(path); @@ -198,10 +210,16 @@ } /* * Use user-supplied inode, or look up the path */ + if (inode != XVFS_INODE_NULL) { + if (inode >= || inode < 0) { + inode = XVFS_INODE_NULL; + path = NULL; + } + } if (inode == XVFS_INODE_NULL) { /* * Get the inode from the lookup function */ inode = xvfs__nameToIndex(path); Index: xvfs-create-c.c ================================================================== --- xvfs-create-c.c +++ xvfs-create-c.c @@ -315,10 +315,12 @@ fprintf(outfp, "_data[] = {\n"); parse_xvfs_minirivet_directory(outfp, xvfs_state, options->directory, ""); fprintf(outfp, "};\n"); } else if (strcmp(buffer_p, "[zlib adler32 $::xvfs::fsName 0]") == 0) { fprintf(outfp, "%lu", adler32(0, (unsigned char *) options->name, strlen(options->name))); + } else if (strcmp(buffer_p, "[llength $::xvfs::outputFiles]") == 0) { + fprintf(outfp, "%lu", xvfs_state->child_count); } else if (strcmp(buffer_p, "$hashTableHeader") == 0) { parse_xvfs_minirivet_hashtable_header(outfp, xvfs_state); } else if (strcmp(buffer_p, "[dict get $hashTable body]") == 0) { parse_xvfs_minirivet_hashtable_body(outfp, xvfs_state); } else {