7 int main(
int argc,
char *argv[])
13 printf(
"Need a filename and offset\n");
22 long long int off = 0;
23 if(argc>2) off = atoi(argv[2]);
26 int ret = sfs.mountSingleDir(argv[1], off);
29 printf(
"Error mounting %s",argv[1]);
35 long long int last_off = off;
36 sz= sfs.singleDirSize;
37 off = sfs.singleDirOffset;
40 LOG(
"JEFF",
"Mounting new directory: (%s) offset=%lld (calc: %lld) size=%d",
41 sfs.singleDirIttr->fullpath,
43 (last_off + last_sz) - off,
47 fs_dir *dir = sfs.opendir(
"/");
50 sfs.mem_ls(&list, 1, dir);
51 for(
int i=0;i<list.n;i++) {
52 if(strstr(list.filename[i],
"TRGID") != NULL) {
53 int sz = sfs.fileSize(list.filename[i]);
54 LOG(
"JEFF",
"%s: %d bytes",list.filename[i],sz);
55 char *buff = (
char *)malloc(sz);
56 sfs.read(list.filename[i], buff, sz);
57 sfs.hexdump(buff, sz);
65 printf(
"no rootdir?\n");
68 ret = sfs.mountNextDir();