。。。
for (i = 0; i < header.tbl_entry_num; i++) {
//TODO: support tbl_entry_size
memcpy(entry, table + i * header.tbl_entry_size * BLOCK_SIZE,
sizeof(*entry));
if (memcmp(entry->tag, INDEX_TBL_ENTR_TAG,
sizeof(entry->tag))) {
FBTERR("Something wrong with index entry:%d!n", i);
goto end;
}
FBTDBG("Lookup entry(%d):ntpath:%sntoffset:%dtsize:%dn",
i, entry->path, entry->content_offset,
entry->content_size);
if (!strncmp(entry->path, file_path, sizeof(entry->path)))
break;
}
。。。
。。。
for (i = 0; i < header.tbl_entry_num; i++) {
//TODO: support tbl_entry_size
memcpy(entry, table + i * header.tbl_entry_size * BLOCK_SIZE,
sizeof(*entry));
if (memcmp(entry->tag, INDEX_TBL_ENTR_TAG,
sizeof(entry->tag))) {
FBTERR("Something wrong with index entry:%d!n", i);
goto end;
}
FBTDBG("Lookup entry(%d):ntpath:%sntoffset:%dtsize:%dn",
i, entry->path, entry->content_offset,
entry->content_size);
if (!strncmp(entry->path, file_path, sizeof(entry->path)))
break;
}
。。。