Skip to content

Commit

Permalink
dumpdfs: fix extract command after dragonfs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Nov 24, 2024
1 parent 7bf5d96 commit ccfa43b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/dumpdfs/dumpdfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,13 +835,13 @@ int main( int argc, char *argv[] )
int offset = 0;
if (!strstr(argv[2], ".dfs"))
{
void *fs = memmem(filesystem, lSize, &root_dirent, sizeof(root_dirent));
void *fs = memmem(filesystem, lSize, ((uint8_t *)&root_dirent)+4, sizeof(root_dirent)-8); //Exclude ROOT_NEXT_ENTRY and root file_pointer
if (!fs)
{
fprintf(stderr, "cannot find DragonFS in ROM\n");
return -1;
}
offset = fs - filesystem;
offset = (fs - filesystem) - 4;
}

if (dfs_init_pc( filesystem+offset, 1 ) != DFS_ESUCCESS)
Expand Down

0 comments on commit ccfa43b

Please sign in to comment.