FreeCalypso > hg > freecalypso-sw
diff ffstools/tiffs-rd/inode.c @ 233:ae9ff2d1e3da
tiffs IVA: basic ls integrated
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 26 Jan 2014 10:54:42 +0000 |
parents | 73372cfdaf7f |
children | 024042383a26 |
line wrap: on
line diff
--- a/ffstools/tiffs-rd/inode.c Sun Jan 26 08:42:59 2014 +0000 +++ b/ffstools/tiffs-rd/inode.c Sun Jan 26 10:54:42 2014 +0000 @@ -4,7 +4,6 @@ #include <sys/types.h> #include <endian.h> -#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -12,7 +11,6 @@ #include "types.h" #include "struct.h" #include "globals.h" -#include "pathname.h" u8 blank_flash_line[16] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; @@ -161,44 +159,3 @@ fprintf(stderr, "error: no root inode found; try -r\n"); exit(1); } - -validate_obj_name(ino, root_special) -{ - struct inode_info *inf = inode_info[ino]; - u8 *p, *endp; - int c; - - if (!inf->len) - return(0); - p = inf->dataptr; - endp = p + inf->len; - for (; ; p++) { - if (p >= endp) - return(0); - c = *p; - if (!c) - break; - if (c < ' ' || c > '~') - return(0); - if (root_special || isalnum(c)) - continue; - switch (c) { - case '.': - case ',': - case '_': - case '-': - case '+': - case '%': - case '$': - case '#': - continue; - default: - return(0); - } - } - c = p - inf->dataptr; - if (c < 1 || c > MAX_FN_COMPONENT && !root_special) - return(0); - inf->byte_after_name = p + 1; - return(1); -}