1 Index: tdbsa/tdb.c 2 =================================================================== 3 --- tdbsa.orig/tdb.c 4 +++ tdbsa/tdb.c 5 @@ -251,39 +251,39 @@ struct tdb_context { 6 /* 7 internal prototypes 8 */ 9 -int tdb_munmap(struct tdb_context *tdb); 10 -void tdb_mmap(struct tdb_context *tdb); 11 -int tdb_lock(struct tdb_context *tdb, int list, int ltype); 12 -int tdb_unlock(struct tdb_context *tdb, int list, int ltype); 13 -int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len); 14 -int tdb_transaction_lock(struct tdb_context *tdb, int ltype); 15 -int tdb_transaction_unlock(struct tdb_context *tdb); 16 -int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len); 17 -int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off); 18 -int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off); 19 -int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 20 -int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 21 -void *tdb_convert(void *buf, u32 size); 22 -int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 23 -tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec); 24 -int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 25 -int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 26 -int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off); 27 -int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off); 28 -int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 29 -int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 30 -int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec); 31 -unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len); 32 -int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key, 33 +static int tdb_munmap(struct tdb_context *tdb); 34 +static void tdb_mmap(struct tdb_context *tdb); 35 +static int tdb_lock(struct tdb_context *tdb, int list, int ltype); 36 +static int tdb_unlock(struct tdb_context *tdb, int list, int ltype); 37 +static int tdb_brlock(struct tdb_context *tdb, tdb_off_t offset, int rw_type, int lck_type, int probe, size_t len); 38 +static int tdb_transaction_lock(struct tdb_context *tdb, int ltype); 39 +static int tdb_transaction_unlock(struct tdb_context *tdb); 40 +static int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len); 41 +static int tdb_write_lock_record(struct tdb_context *tdb, tdb_off_t off); 42 +static int tdb_write_unlock_record(struct tdb_context *tdb, tdb_off_t off); 43 +static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 44 +static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 45 +static void *tdb_convert(void *buf, u32 size); 46 +static int tdb_free(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 47 +static tdb_off_t tdb_allocate(struct tdb_context *tdb, tdb_len_t length, struct list_struct *rec); 48 +static int tdb_ofs_read(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 49 +static int tdb_ofs_write(struct tdb_context *tdb, tdb_off_t offset, tdb_off_t *d); 50 +static int tdb_lock_record(struct tdb_context *tdb, tdb_off_t off); 51 +static int tdb_unlock_record(struct tdb_context *tdb, tdb_off_t off); 52 +static int tdb_rec_read(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 53 +static int tdb_rec_write(struct tdb_context *tdb, tdb_off_t offset, struct list_struct *rec); 54 +static int tdb_do_delete(struct tdb_context *tdb, tdb_off_t rec_ptr, struct list_struct *rec); 55 +static unsigned char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len); 56 +static int tdb_parse_data(struct tdb_context *tdb, TDB_DATA key, 57 tdb_off_t offset, tdb_len_t len, 58 int (*parser)(TDB_DATA key, TDB_DATA data, 59 void *private_data), 60 void *private_data); 61 -tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype, 62 +static tdb_off_t tdb_find_lock_hash(struct tdb_context *tdb, TDB_DATA key, u32 hash, int locktype, 63 struct list_struct *rec); 64 -void tdb_io_init(struct tdb_context *tdb); 65 -int tdb_expand(struct tdb_context *tdb, tdb_off_t size); 66 -int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, 67 +static void tdb_io_init(struct tdb_context *tdb); 68 +static int tdb_expand(struct tdb_context *tdb, tdb_off_t size); 69 +static int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off, 70 struct list_struct *rec); 71 72 73