FreeCalypso > hg > freecalypso-tools
diff ffstools/tiffs-rd/tree.c @ 919:1f27fc13eab7
tiffs: add support for extended filenames found in SE K2x0 FFS
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 31 Dec 2022 09:27:01 +0000 |
parents | e7502631a0f9 |
children |
line wrap: on
line diff
--- a/ffstools/tiffs-rd/tree.c Fri Dec 30 22:04:30 2022 +0000 +++ b/ffstools/tiffs-rd/tree.c Sat Dec 31 09:27:01 2022 +0000 @@ -45,14 +45,18 @@ dirino, child); continue; } - if (!validate_obj_name(child, 0)) { + if (validate_obj_name(child, 0)) { + sprintf(pathbuf_ptr, "/%s", inf->dataptr); + callback(pathbuf_start, child, ndepth, 0); + } else if (object_name_mincheck(child)) { + sprintf(pathbuf_ptr, "/!bogo%04x", child); + callback(pathbuf_start, child, ndepth, 1); + } else { fprintf(stderr, "visible tree walk error: no valid name for inode #%x\n", child); continue; } - sprintf(pathbuf_ptr, "/%s", inf->dataptr); - callback(pathbuf_start, child, ndepth); if (inf->type == 0xF2) visible_walk_dir(pathbuf_start, index(pathbuf_ptr, '\0'), child, @@ -103,7 +107,7 @@ dirino, ino); continue; } - if (!validate_obj_name(ino, 0)) { + if (!object_name_mincheck(ino)) { fprintf(stderr, "visible tree walk error: no valid name for inode #%x\n", ino);