Lines Matching refs:tdb
104 static TDB_CONTEXT *tdb; variable
189 if (tdb) tdb_close(tdb); in create_tdb()
190 tdb = tdb_open(tdbname, 0, TDB_CLEAR_IF_FIRST, in create_tdb()
192 if (!tdb) { in create_tdb()
199 if (tdb) tdb_close(tdb); in open_tdb()
200 tdb = tdb_open(tdbname, 0, 0, O_RDWR, 0600); in open_tdb()
201 if (!tdb) { in open_tdb()
220 if (tdb_store(tdb, key, dbuf, TDB_INSERT) == -1) { in insert_tdb()
245 print_rec(tdb, key, dbuf, NULL); in store_tdb()
247 if (tdb_store(tdb, key, dbuf, TDB_REPLACE) == -1) { in store_tdb()
264 dbuf = tdb_fetch(tdb, key); in show_tdb()
270 print_rec(tdb, key, dbuf, NULL); in show_tdb()
289 if (tdb_delete(tdb, key) != 0) { in delete_tdb()
312 dbuf = tdb_fetch(tdb, key); in move_rec()
318 print_rec(tdb, key, dbuf, NULL); in move_rec()
374 if ((count = tdb_traverse(tdb, traverse_fn, NULL)) == -1) in info_tdb()
375 printf("Error = %s\n", tdb_errorstr(tdb)); in info_tdb()
458 if (!tdb) { in do_command()
467 tdb_traverse(tdb, do_delete_fn, NULL); in do_command()
471 tdb_traverse(tdb, print_rec, NULL); in do_command()
490 tdb_traverse(tdb, print_key, NULL); in do_command()
493 tdb_traverse(tdb, print_hexkey, NULL); in do_command()
500 tdb_dump_all(tdb); in do_command()
503 tdb_printfreelist(tdb); in do_command()
510 first_record(tdb, &iterate_kbuf); in do_command()
514 next_record(tdb, &iterate_kbuf); in do_command()
617 if (tdb) tdb_close(tdb); in main()