summaryrefslogtreecommitdiff
path: root/apps/tagcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagcache.c')
-rw-r--r--apps/tagcache.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 0ddf2b0228..3a8e73599b 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1568,7 +1568,7 @@ static void add_tagcache(char *path)
1568 if (path_length > TAG_MAXLEN) 1568 if (path_length > TAG_MAXLEN)
1569 { 1569 {
1570 /* Path can't be shortened. */ 1570 /* Path can't be shortened. */
1571 logf("Too long path: %s"); 1571 logf("Too long path: %s", path);
1572 return ; 1572 return ;
1573 } 1573 }
1574 1574
@@ -1974,7 +1974,7 @@ static bool build_numeric_indices(struct tagcache_header *h, int tmpfd)
1974 } 1974 }
1975 1975
1976 entries_processed += count; 1976 entries_processed += count;
1977 logf("%d/%d entries processed", entries_processed, h->entry_count); 1977 logf("%d/%ld entries processed", entries_processed, h->entry_count);
1978 } 1978 }
1979 1979
1980 close(masterfd); 1980 close(masterfd);
@@ -2019,7 +2019,7 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd)
2019 fd = open_tag_fd(&tch, index_type, true); 2019 fd = open_tag_fd(&tch, index_type, true);
2020 if (fd >= 0) 2020 if (fd >= 0)
2021 { 2021 {
2022 logf("tch.datasize=%d", tch.datasize); 2022 logf("tch.datasize=%ld", tch.datasize);
2023 lookup_buffer_depth = 1 + 2023 lookup_buffer_depth = 1 +
2024 /* First part */ commit_entry_count + 2024 /* First part */ commit_entry_count +
2025 /* Second part */ (tch.datasize / TAGFILE_ENTRY_CHUNK_LENGTH); 2025 /* Second part */ (tch.datasize / TAGFILE_ENTRY_CHUNK_LENGTH);
@@ -2031,8 +2031,8 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd)
2031 /* Second part */ 0; 2031 /* Second part */ 0;
2032 } 2032 }
2033 2033
2034 logf("lookup_buffer_depth=%d", lookup_buffer_depth); 2034 logf("lookup_buffer_depth=%ld", lookup_buffer_depth);
2035 logf("commit_entry_count=%d", commit_entry_count); 2035 logf("commit_entry_count=%ld", commit_entry_count);
2036 2036
2037 /* Allocate buffer for all index entries from both old and new 2037 /* Allocate buffer for all index entries from both old and new
2038 * tag files. */ 2038 * tag files. */
@@ -2322,7 +2322,7 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd)
2322 2322
2323 if (idxbuf[j].tag_seek[index_type] < 0) 2323 if (idxbuf[j].tag_seek[index_type] < 0)
2324 { 2324 {
2325 logf("update error: %d/%d", i+j, tcmh.tch.entry_count); 2325 logf("update error: %d/%ld", i+j, tcmh.tch.entry_count);
2326 error = true; 2326 error = true;
2327 goto error_exit; 2327 goto error_exit;
2328 } 2328 }
@@ -2405,7 +2405,7 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd)
2405 entry.tag_length[index_type]) 2405 entry.tag_length[index_type])
2406 { 2406 {
2407 logf("read fail #8"); 2407 logf("read fail #8");
2408 logf("offset=0x%02x", entry.tag_offset[index_type]); 2408 logf("offset=0x%02lx", entry.tag_offset[index_type]);
2409 logf("length=0x%02x", entry.tag_length[index_type]); 2409 logf("length=0x%02x", entry.tag_length[index_type]);
2410 error = true; 2410 error = true;
2411 break ; 2411 break ;
@@ -2459,7 +2459,7 @@ static int build_index(int index_type, struct tagcache_header *h, int tmpfd)
2459 2459
2460 if (index_type != tag_filename) 2460 if (index_type != tag_filename)
2461 h->datasize += tch.datasize; 2461 h->datasize += tch.datasize;
2462 logf("s:%d/%d/%d", index_type, tch.datasize, h->datasize); 2462 logf("s:%d/%ld/%ld", index_type, tch.datasize, h->datasize);
2463 error_exit: 2463 error_exit:
2464 2464
2465 close(fd); 2465 close(fd);
@@ -2564,7 +2564,7 @@ static bool commit(void)
2564 return false; 2564 return false;
2565 } 2565 }
2566 2566
2567 logf("commit %d entries...", tch.entry_count); 2567 logf("commit %ld entries...", tch.entry_count);
2568 2568
2569 /* Mark DB dirty so it will stay disabled if commit fails. */ 2569 /* Mark DB dirty so it will stay disabled if commit fails. */
2570 current_tcmh.dirty = true; 2570 current_tcmh.dirty = true;
@@ -3050,7 +3050,7 @@ static bool delete_entry(long idx_id)
3050 char buf[TAG_MAXLEN+32]; 3050 char buf[TAG_MAXLEN+32];
3051 int in_use[TAG_COUNT]; 3051 int in_use[TAG_COUNT];
3052 3052
3053 logf("delete_entry(): %d", idx_id); 3053 logf("delete_entry(): %ld", idx_id);
3054 3054
3055#ifdef HAVE_TC_RAMCACHE 3055#ifdef HAVE_TC_RAMCACHE
3056 /* At first mark the entry removed from ram cache. */ 3056 /* At first mark the entry removed from ram cache. */
@@ -3482,7 +3482,7 @@ static bool load_tagcache(void)
3482 { 3482 {
3483 logf("too big tagcache #2"); 3483 logf("too big tagcache #2");
3484 logf("tl: %d", fe->tag_length); 3484 logf("tl: %d", fe->tag_length);
3485 logf("bl: %d", bytesleft); 3485 logf("bl: %ld", bytesleft);
3486 close(fd); 3486 close(fd);
3487 return false; 3487 return false;
3488 } 3488 }