Lines Matching refs:db
63 state_close(DB *db) in state_close() argument
65 if (db == NULL) in state_close()
67 if ((*db->close)(db) == -1) { in state_close()
77 DB *db; in state_open() local
83 db = dbopen(dbname, flags, perm, DB_HASH, &openinfo); in state_open()
84 if (db == NULL) { in state_open()
89 return db; in state_open()
114 state_del(DB *db, const struct conf *c) in state_del() argument
119 if (db == NULL) in state_del()
125 switch (rv = (*db->del)(db, &k, 0)) { in state_del()
130 (*db->sync)(db, 0); in state_del()
140 state_get(DB *db, const struct conf *c, struct dbinfo *dbi) in state_get() argument
145 if (db == NULL) in state_get()
151 switch (rv = (*db->get)(db, &k, &v, 0)) { in state_get()
168 state_put(DB *db, const struct conf *c, const struct dbinfo *dbi) in state_put() argument
173 if (db == NULL) in state_put()
181 switch (rv = (*db->put)(db, &k, &v, 0)) { in state_put()
185 (*db->sync)(db, 0); in state_put()
198 state_iterate(DB *db, struct conf *c, struct dbinfo *dbi, unsigned int first) in state_iterate() argument
203 if (db == NULL) { in state_iterate()
210 switch (rv = (*db->seq)(db, &k, &v, first)) { in state_iterate()
232 state_sync(DB *db) in state_sync() argument
234 return (*db->sync)(db, 0); in state_sync()