# HG changeset patch # User Mychaela Falconia # Date 1477497134 0 # Node ID 87cb03b35f776a74aa12b01e56f68ead87c03a97 # Parent 819335e06fd16a4fccd7dd22f44329319cbdb132 target-utils: long-overdue s/mpffs/tiffs/ and s/MPFFS/TIFFS/ rename diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/basicfind.c --- a/target-utils/libtiffs/basicfind.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/basicfind.c Wed Oct 26 15:52:14 2016 +0000 @@ -14,7 +14,7 @@ struct inode *irec; for (ino = start; ino != 0xFFFF; ino = irec->sibling) { - irec = mpffs_active_index + ino; + irec = tiffs_active_index + ino; if (!irec->type) continue; if (!strcmp(inode_to_dataptr(irec), seekname)) @@ -23,20 +23,20 @@ return(0); } -mpffs_pathname_to_inode(pathname) +tiffs_pathname_to_inode(pathname) char *pathname; { int ino, stat; struct inode *irec; char *cur, *next; - stat = mpffs_init(); + stat = tiffs_init(); if (stat < 0) return(stat); cur = pathname; if (*cur == '/') cur++; - for (ino = mpffs_root_ino; cur; cur = next) { + for (ino = tiffs_root_ino; cur; cur = next) { if (!*cur) break; next = index(cur, '/'); @@ -46,7 +46,7 @@ } if (next) *next++ = '\0'; - irec = mpffs_active_index + ino; + irec = tiffs_active_index + ino; if (irec->type != OBJTYPE_DIR) { printf("Error: non-terminal non-directory\n"); if (next) diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/cmd_find.c --- a/target-utils/libtiffs/cmd_find.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/cmd_find.c Wed Oct 26 15:52:14 2016 +0000 @@ -12,12 +12,12 @@ if (parse_args(argbulk, 1, 1, argv, 0) < 0) return; - stat = mpffs_find_file(argv[0], &start, &size, &cont); + stat = tiffs_find_file(argv[0], &start, &size, &cont); if (stat < 0) return; printf("chunk @%08X size %x\n", (u32)start, (u32)size); while (cont) { - stat = mpffs_get_segment(cont, &start, &size, &cont); + stat = tiffs_get_segment(cont, &start, &size, &cont); if (stat < 0) return; printf("chunk @%08X size %x\n", (u32)start, (u32)size); diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/findfile.c --- a/target-utils/libtiffs/findfile.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/findfile.c Wed Oct 26 15:52:14 2016 +0000 @@ -7,7 +7,7 @@ static u8 * find_endofchunk(ino) { - struct inode *irec = mpffs_active_index + ino; + struct inode *irec = tiffs_active_index + ino; u8 *p; int i; @@ -23,7 +23,7 @@ return(p); /* XXX */ } -mpffs_find_file(pathname, startret, sizeret, continue_ret) +tiffs_find_file(pathname, startret, sizeret, continue_ret) char *pathname; u8 **startret; size_t *sizeret; @@ -34,10 +34,10 @@ u8 *start, *end; int size; - ino = mpffs_pathname_to_inode(pathname); + ino = tiffs_pathname_to_inode(pathname); if (ino <= 0) return(-1); - irec = mpffs_active_index + ino; + irec = tiffs_active_index + ino; if (irec->type != OBJTYPE_FILE) { printf("Error: %s is not a regular file\n", pathname); return(-1); @@ -60,7 +60,7 @@ return(0); } -mpffs_get_segment(ino, startret, sizeret, continue_ret) +tiffs_get_segment(ino, startret, sizeret, continue_ret) int ino; u8 **startret; size_t *sizeret; @@ -72,7 +72,7 @@ int size; for (;;) { - irec = mpffs_active_index + ino; + irec = tiffs_active_index + ino; if (irec->type) break; if (irec->sibling == 0xFFFF) { diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/globals.c --- a/target-utils/libtiffs/globals.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/globals.c Wed Oct 26 15:52:14 2016 +0000 @@ -1,8 +1,8 @@ -/* global variables for the MPFFS reader code */ +/* global variables for the TIFFS reader code */ #include "types.h" #include "struct.h" -struct inode *mpffs_active_index; -int mpffs_root_ino; -int mpffs_init_done; +struct inode *tiffs_active_index; +int tiffs_root_ino; +int tiffs_init_done; diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/globals.h --- a/target-utils/libtiffs/globals.h Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/globals.h Wed Oct 26 15:52:14 2016 +0000 @@ -1,9 +1,9 @@ -/* global variables for the MPFFS reader code - extern declarations */ +/* global variables for the TIFFS reader code - extern declarations */ -extern struct inode *mpffs_active_index; -extern int mpffs_root_ino; -extern int mpffs_init_done; +extern struct inode *tiffs_active_index; +extern int tiffs_root_ino; +extern int tiffs_init_done; -extern const u32 mpffs_base_addr; -extern const u32 mpffs_sector_size; -extern const int mpffs_nsectors; +extern const u32 tiffs_base_addr; +extern const u32 tiffs_sector_size; +extern const int tiffs_nsectors; diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/init.c --- a/target-utils/libtiffs/init.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/init.c Wed Oct 26 15:52:14 2016 +0000 @@ -15,20 +15,20 @@ u8 *sector_ptr; int i; - printf("Looking for MPFFS active index block\n"); - sector_addr = mpffs_base_addr; - for (i = 0; i < mpffs_nsectors; i++) { + printf("Looking for TIFFS active index block\n"); + sector_addr = tiffs_base_addr; + for (i = 0; i < tiffs_nsectors; i++) { sector_ptr = (u8 *) sector_addr; if (!bcmp(sector_ptr, ffs_sector_signature, 6) && sector_ptr[8] == 0xAB) { printf("Found at %08X\n", sector_addr); - mpffs_active_index = (struct inode *) sector_ptr; + tiffs_active_index = (struct inode *) sector_ptr; return(0); } - sector_addr += mpffs_sector_size; + sector_addr += tiffs_sector_size; } printf("Error: Not found in any of the %d candidate sectors\n", - mpffs_nsectors); + tiffs_nsectors); return(-1); } @@ -40,11 +40,11 @@ printf("Looking for the root inode\n"); for (ino = 1; ; ino++) { - if (ino >= mpffs_sector_size >> 4) { + if (ino >= tiffs_sector_size >> 4) { printf("Error: Hit end of sector, no root inode found\n"); return(-1); } - irec = mpffs_active_index + ino; + irec = tiffs_active_index + ino; if (!bcmp((u8 *) irec, blank_flash_line, 16)) { printf("Error: Hit blank flash, no root inode found\n"); return(-1); @@ -53,15 +53,15 @@ break; } printf("Found at inode #%x\n", ino); - mpffs_root_ino = ino; + tiffs_root_ino = ino; return(0); } -mpffs_init() +tiffs_init() { int stat; - if (mpffs_init_done) + if (tiffs_init_done) return(0); stat = find_indexblk(); if (stat < 0) @@ -69,6 +69,6 @@ stat = find_rootino(); if (stat < 0) return(stat); - mpffs_init_done = 1; + tiffs_init_done = 1; return(0); } diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/macros.h --- a/target-utils/libtiffs/macros.h Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/macros.h Wed Oct 26 15:52:14 2016 +0000 @@ -1,1 +1,1 @@ -#define inode_to_dataptr(i) ((u8 *)mpffs_base_addr + ((i)->dataptr << 4)) +#define inode_to_dataptr(i) ((u8 *)tiffs_base_addr + ((i)->dataptr << 4)) diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/libtiffs/rdinmem.c --- a/target-utils/libtiffs/rdinmem.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/libtiffs/rdinmem.c Wed Oct 26 15:52:14 2016 +0000 @@ -4,7 +4,7 @@ #include "globals.h" #include "macros.h" -mpffs_read_into_ram(pathname, buf, maxlen, lenrtn) +tiffs_read_into_ram(pathname, buf, maxlen, lenrtn) char *pathname; u8 *buf; size_t maxlen, *lenrtn; @@ -13,7 +13,7 @@ u8 *chunk_start; size_t chunk_size, real_len, roomleft; - stat = mpffs_find_file(pathname, &chunk_start, &chunk_size, &cont); + stat = tiffs_find_file(pathname, &chunk_start, &chunk_size, &cont); if (stat < 0) return(stat); if (chunk_size > maxlen) { @@ -25,7 +25,7 @@ buf += chunk_size; roomleft = maxlen - chunk_size; while (cont) { - stat = mpffs_get_segment(cont, &chunk_start, &chunk_size, + stat = tiffs_get_segment(cont, &chunk_start, &chunk_size, &cont); if (stat < 0) return(stat); diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/pirexplore/cmdtab.c --- a/target-utils/pirexplore/cmdtab.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/pirexplore/cmdtab.c Wed Oct 26 15:52:14 2016 +0000 @@ -27,7 +27,7 @@ extern void abb_init(); extern void abb_power_off(); extern void cmd_memdump_human(); -extern void mpffs_init(); +extern void tiffs_init(); const struct cmdtab cmdtab[] = { {"abbinit", abb_init}, @@ -39,7 +39,7 @@ {"buzlev", cmd_buzlev}, {"dieid", cmd_dieid}, {"dump", cmd_memdump_human}, - {"ffsinit", mpffs_init}, + {"ffsinit", tiffs_init}, {"find", cmd_find}, {"flashid", cmd_flashid}, {"jump", cmd_jump}, diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/pirexplore/ffsparam.c --- a/target-utils/pirexplore/ffsparam.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/pirexplore/ffsparam.c Wed Oct 26 15:52:14 2016 +0000 @@ -1,11 +1,11 @@ /* * This module is linked into pirexplore for the purpose of telling the - * somewhat generic libmpffs exactly where the FFS is located on this + * somewhat generic libtiffs exactly where the FFS is located on this * device and how it is structured. */ #include "types.h" -const u32 mpffs_base_addr = 0x02000000; -const u32 mpffs_sector_size = 0x40000; -const int mpffs_nsectors = 18; +const u32 tiffs_base_addr = 0x02000000; +const u32 tiffs_sector_size = 0x40000; +const int tiffs_nsectors = 18; diff -r 819335e06fd1 -r 87cb03b35f77 target-utils/pirexplore/lcd.c --- a/target-utils/pirexplore/lcd.c Wed Oct 26 15:28:29 2016 +0000 +++ b/target-utils/pirexplore/lcd.c Wed Oct 26 15:52:14 2016 +0000 @@ -226,7 +226,7 @@ if (parse_args(argbulk, 1, 5, argv, &argc) < 0) return; - if (mpffs_read_into_ram(argv[0], imgbuf, 32768, &img_file_size) < 0) + if (tiffs_read_into_ram(argv[0], imgbuf, 32768, &img_file_size) < 0) return; switch (argc) { case 1: