comparison 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
comparison
equal deleted inserted replaced
918:0c33e24ff935 919:1f27fc13eab7
43 fprintf(stderr, 43 fprintf(stderr,
44 "warning: directory #%x has child #%x of type segment (F4), skipping\n", 44 "warning: directory #%x has child #%x of type segment (F4), skipping\n",
45 dirino, child); 45 dirino, child);
46 continue; 46 continue;
47 } 47 }
48 if (!validate_obj_name(child, 0)) { 48 if (validate_obj_name(child, 0)) {
49 sprintf(pathbuf_ptr, "/%s", inf->dataptr);
50 callback(pathbuf_start, child, ndepth, 0);
51 } else if (object_name_mincheck(child)) {
52 sprintf(pathbuf_ptr, "/!bogo%04x", child);
53 callback(pathbuf_start, child, ndepth, 1);
54 } else {
49 fprintf(stderr, 55 fprintf(stderr,
50 "visible tree walk error: no valid name for inode #%x\n", 56 "visible tree walk error: no valid name for inode #%x\n",
51 child); 57 child);
52 continue; 58 continue;
53 } 59 }
54 sprintf(pathbuf_ptr, "/%s", inf->dataptr);
55 callback(pathbuf_start, child, ndepth);
56 if (inf->type == 0xF2) 60 if (inf->type == 0xF2)
57 visible_walk_dir(pathbuf_start, 61 visible_walk_dir(pathbuf_start,
58 index(pathbuf_ptr, '\0'), child, 62 index(pathbuf_ptr, '\0'), child,
59 ndepth, callback); 63 ndepth, callback);
60 } 64 }
101 fprintf(stderr, 105 fprintf(stderr,
102 "warning: directory #%x has child #%x of type segment (F4), skipping\n", 106 "warning: directory #%x has child #%x of type segment (F4), skipping\n",
103 dirino, ino); 107 dirino, ino);
104 continue; 108 continue;
105 } 109 }
106 if (!validate_obj_name(ino, 0)) { 110 if (!object_name_mincheck(ino)) {
107 fprintf(stderr, 111 fprintf(stderr,
108 "visible tree walk error: no valid name for inode #%x\n", 112 "visible tree walk error: no valid name for inode #%x\n",
109 ino); 113 ino);
110 continue; 114 continue;
111 } 115 }