/freebsd/usr.sbin/ypserv/ |
H A D | yp_dblookup.c | 73 DB *dbp; member 135 if (q->dbptr->dbp) { in yp_free_qent() 136 (void)(q->dbptr->dbp->close)(q->dbptr->dbp); in yp_free_qent() 137 q->dbptr->dbp = NULL; in yp_free_qent() 196 yp_setflags(DB *dbp) in yp_setflags() argument 204 if (!(dbp->get)(dbp, &key, &data, 0)) in yp_setflags() 210 if (!(dbp->get)(dbp, &key, &data, 0)) in yp_setflags() 254 yp_cache_db(DB *dbp, char *name, int size) in yp_cache_db() argument 273 qptr->dbptr->dbp = dbp; in yp_cache_db() 278 qptr->dbptr->flags = yp_setflags(dbp); in yp_cache_db() [all …]
|
/freebsd/crypto/heimdal/lib/hdb/ |
H A D | dbinfo.c | 91 hdb_get_dbinfo(krb5_context context, struct hdb_dbinfo **dbp) in hdb_get_dbinfo() argument 101 *dbp = NULL; in hdb_get_dbinfo() 166 *dbp = databases; in hdb_get_dbinfo() 172 hdb_dbinfo_get_next(struct hdb_dbinfo *dbp, struct hdb_dbinfo *dbprevp) in hdb_dbinfo_get_next() argument 175 return dbp; in hdb_dbinfo_get_next() 181 hdb_dbinfo_get_label(krb5_context context, struct hdb_dbinfo *dbp) in hdb_dbinfo_get_label() argument 183 return dbp->label; in hdb_dbinfo_get_label() 187 hdb_dbinfo_get_realm(krb5_context context, struct hdb_dbinfo *dbp) in hdb_dbinfo_get_realm() argument 189 return dbp->realm; in hdb_dbinfo_get_realm() 193 hdb_dbinfo_get_dbname(krb5_context context, struct hdb_dbinfo *dbp) in hdb_dbinfo_get_dbname() argument [all …]
|
H A D | hdb-protos.h | 51 struct hdb_dbinfo */*dbp*/); 56 struct hdb_dbinfo */*dbp*/); 61 struct hdb_dbinfo */*dbp*/); 66 struct hdb_dbinfo */*dbp*/); 71 struct hdb_dbinfo */*dbp*/); 76 struct hdb_dbinfo */*dbp*/); 80 struct hdb_dbinfo */*dbp*/, 86 struct hdb_dbinfo */*dbp*/); 192 struct hdb_dbinfo **/*dbp*/); 232 struct hdb_dbinfo **/*dbp*/);
|
/freebsd/bin/dd/ |
H A D | conv.c | 59 for (inp = in.dbp - (cnt = in.dbrcnt); cnt--; ++inp) in def() 63 out.dbp = in.dbp; in def() 75 in.dbp = out.dbp; in def() 115 in.dbp = in.db; in block() 121 in.dbp = inp + cnt - 1; in block() 129 for (inp = in.dbp - in.dbcnt, outp = out.dbp; in.dbcnt;) { in block() 144 (void)memmove(in.db, in.dbp - in.dbcnt, in.dbcnt); in block() 174 out.dbp += cbsz; in block() 177 outp = out.dbp; in block() 179 in.dbp = in.db + in.dbcnt; in block() [all …]
|
/freebsd/lib/libc/db/test/ |
H A D | dbtest.c | 82 DB *dbp; local 151 if ((dbp = dbopen(fname, 154 XXdbp = dbp; 201 rem(dbp, &key); 211 synk(dbp); 221 seq(dbp, &key); 241 put(dbp, &key, &data); 274 getdata(dbp, &key, &keydata); 278 get(dbp, &key); 287 rem(dbp, &key); [all …]
|
/freebsd/lib/libc/db/recno/ |
H A D | rec_close.c | 50 * dbp: pointer to access method 56 __rec_close(DB *dbp) in __rec_close() argument 61 t = dbp->internal; in __rec_close() 69 if (__rec_sync(dbp, 0) == RET_ERROR) in __rec_close() 87 if (__bt_close(dbp) == RET_ERROR) in __rec_close() 97 * dbp: pointer to access method 103 __rec_sync(const DB *dbp, u_int flags) in __rec_sync() argument 112 t = dbp->internal; in __rec_sync() 121 return (__bt_sync(dbp, 0)); in __rec_sync() 146 status = (dbp->seq)(dbp, &key, &data, R_FIRST); in __rec_sync() [all …]
|
H A D | rec_open.c | 57 DB *dbp; in __rec_open() local 67 dbp = NULL; in __rec_open() 79 dbp = __bt_open(openinfo->bfname, in __rec_open() 82 dbp = __bt_open(NULL, O_RDWR, S_IRUSR | S_IWUSR, NULL, dflags); in __rec_open() 83 if (dbp == NULL) in __rec_open() 92 t = dbp->internal; in __rec_open() 181 dbp->close = __rec_close; in __rec_open() 182 dbp->del = __rec_delete; in __rec_open() 183 dbp->fd = __rec_fd; in __rec_open() 184 dbp->get = __rec_get; in __rec_open() [all …]
|
/freebsd/usr.sbin/rpc.ypupdated/ |
H A D | yp_dbupdate.c | 79 DB *dbp; in ypmap_update() local 91 dbp = yp_open_db_rw(domptr, map, O_RDWR); in ypmap_update() 92 if (dbp == NULL) in ypmap_update() 102 rval = yp_del_record(dbp, &key); in ypmap_update() 107 rval = yp_put_record(dbp, &key, &data, 0); in ypmap_update() 112 rval = yp_put_record(dbp, &key, &data, 1); in ypmap_update() 121 rval = yp_put_record(dbp, &key, &data, 1); in ypmap_update() 130 (void)(dbp->close)(dbp); in ypmap_update() 139 if (yp_put_record(dbp, &key, &data, 1) != YP_TRUE) { in ypmap_update() 141 (void)(dbp->close)(dbp); in ypmap_update() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/db/ |
H A D | h_db.c | 108 DB *dbp; in main() local 180 if ((dbp = dbopen(fname, in main() 183 XXdbp = dbp; in main() 228 rem(dbp, &key); in main() 237 synk(dbp); in main() 246 seq(dbp, &key); in main() 264 put(dbp, &key, &data); in main() 295 getdata(dbp, &key, &keydata); in main() 299 get(dbp, &key); in main() 308 rem(dbp, &key); in main() [all …]
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_proc.c | 103 dt_bkpt_t *dbp; in dt_proc_bpcreate() local 107 if ((dbp = dt_zalloc(dpr->dpr_hdl, sizeof (dt_bkpt_t))) != NULL) { in dt_proc_bpcreate() 108 dbp->dbp_func = func; in dt_proc_bpcreate() 109 dbp->dbp_data = data; in dt_proc_bpcreate() 110 dbp->dbp_addr = addr; in dt_proc_bpcreate() 112 if (Psetbkpt(P, dbp->dbp_addr, &dbp->dbp_instr) == 0) in dt_proc_bpcreate() 113 dbp->dbp_active = B_TRUE; in dt_proc_bpcreate() 115 dt_list_append(&dpr->dpr_bps, dbp); in dt_proc_bpcreate() 118 return (dbp); in dt_proc_bpcreate() 125 dt_bkpt_t *dbp, *nbp; in dt_proc_bpdestroy() local [all …]
|
/freebsd/usr.sbin/yp_mkdb/ |
H A D | yp_mkdb.c | 79 DB *dbp; in unwind() local 82 dbp = open_db(map, O_RDONLY); in unwind() 84 if (dbp == NULL) in unwind() 88 while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE) in unwind() 92 (void)(dbp->close)(dbp); in unwind() 110 DB *dbp; in main() local 192 if ((dbp = open_db(map, O_RDWR|O_EXLOCK|O_EXCL|O_CREAT)) == NULL) in main() 200 yp_put_record(dbp, &key, &data, 0); in main() 208 yp_put_record(dbp, &key, &data, 0); in main() 215 yp_put_record(dbp, &key, &data, 0); in main() [all …]
|
/freebsd/libexec/ypxfr/ |
H A D | yp_dbwrite.c | 57 DB *dbp; in yp_open_db_rw() local 71 dbp = dbopen(buf,flags ? flags : FLAGS,PERM_SECURE,DB_HASH,&openinfo); in yp_open_db_rw() 73 if (dbp == NULL) { in yp_open_db_rw() 87 return (dbp); in yp_open_db_rw() 91 yp_put_record(DB *dbp, DBT *key, DBT *data, int allow_overwrite) in yp_put_record() argument 95 if ((rval = (dbp->put)(dbp,key,data, allow_overwrite ? 0 : in yp_put_record() 103 (void)(dbp->close)(dbp); in yp_put_record()
|
H A D | ypxfr_main.c | 64 static DB *dbp; variable 75 if (dbp != NULL) in ypxfr_exit() 76 (void)(dbp->close)(dbp); in ypxfr_exit() 152 if (yp_put_record(dbp, &dbkey, &dbval, 0) != YP_TRUE) in ypxfr_foreach() 426 if ((dbp = yp_open_db_rw(ypxfr_dest_domain, tempmap, 0)) == NULL) { in main() 440 if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { in main() 450 if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { in main() 460 if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { in main() 472 if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { in main() 486 if (yp_put_record(dbp, &key, &data, 0) != YP_TRUE) { in main() [all …]
|
/freebsd/lib/libc/db/test/hash.tests/ |
H A D | tseq.c | 50 DB *dbp; local 54 if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, NULL))) { 63 for ( stat = (dbp->seq) (dbp, &res, &item, 1 ); 65 stat = (dbp->seq) (dbp, &res, &item, 0 ) ) { 74 (dbp->close)(dbp);
|
H A D | tdel.c | 50 DB *dbp; local 65 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) { 86 if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) { 100 stat = (dbp->del)(dbp, &key, 0); 108 (dbp->close)(dbp);
|
H A D | thash4.c | 52 DB *dbp; local 67 if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) { 89 if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) { 105 stat = (dbp->get)(dbp, &key, &res, 0); 118 dbp->close(dbp);
|
H A D | tcreat3.c | 49 DB *dbp; local 62 if (!(dbp = dbopen( "hashtest", 84 if ((dbp->put)(dbp, &key, &item, R_NOOVERWRITE) != NULL) { 91 (dbp->close)(dbp);
|
H A D | tread2.c | 53 DB *dbp; local 65 if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) { 82 stat = (dbp->get)(dbp, &key, &res,0); 91 (dbp->close)(dbp);
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/ |
H A D | dmu_os.c | 69 dmu_buf_t **dbp; in dmu_write_pages() local 78 FALSE, FTAG, &numbufs, &dbp); in dmu_write_pages() 85 dmu_buf_t *db = dbp[i]; in dmu_write_pages() 119 dmu_buf_rele_array(dbp, numbufs, FTAG); in dmu_write_pages() 130 dmu_buf_t **dbp; in dmu_read_pages() local 142 IDX_TO_OFF(count - 1) + last_size, TRUE, FTAG, &numbufs, &dbp); in dmu_read_pages() 148 if (dbp[0]->db_offset != 0 || numbufs > 1) { in dmu_read_pages() 150 ASSERT(ISP2(dbp[i]->db_size)); in dmu_read_pages() 151 ASSERT3U((dbp[i]->db_offset % dbp[i]->db_size), ==, 0); in dmu_read_pages() 152 ASSERT3U(dbp[i]->db_size, ==, dbp[0]->db_size); in dmu_read_pages() [all …]
|
/freebsd/lib/libc/db/db/ |
H A D | db.c | 88 * dbp: pointer to the DB structure. 91 __dbpanic(DB *dbp) in __dbpanic() argument 94 dbp->del = (int (*)(const struct __db *, const DBT*, u_int))__dberr; in __dbpanic() 95 dbp->fd = (int (*)(const struct __db *))__dberr; in __dbpanic() 96 dbp->get = (int (*)(const struct __db *, const DBT*, DBT *, u_int))__dberr; in __dbpanic() 97 dbp->put = (int (*)(const struct __db *, DBT *, const DBT *, u_int))__dberr; in __dbpanic() 98 dbp->seq = (int (*)(const struct __db *, DBT *, DBT *, u_int))__dberr; in __dbpanic() 99 dbp->sync = (int (*)(const struct __db *, u_int))__dberr; in __dbpanic()
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | dmu.c | 176 const void *tag, dmu_buf_t **dbp) in dmu_buf_hold_noread_by_dnode() argument 187 *dbp = NULL; in dmu_buf_hold_noread_by_dnode() 191 *dbp = &db->db; in dmu_buf_hold_noread_by_dnode() 197 const void *tag, dmu_buf_t **dbp) in dmu_buf_hold_noread() argument 214 *dbp = NULL; in dmu_buf_hold_noread() 218 *dbp = &db->db; in dmu_buf_hold_noread() 224 const void *tag, dmu_buf_t **dbp, int flags) in dmu_buf_hold_by_dnode() argument 234 err = dmu_buf_hold_noread_by_dnode(dn, offset, tag, dbp); in dmu_buf_hold_by_dnode() 236 dmu_buf_impl_t *db = (dmu_buf_impl_t *)(*dbp); in dmu_buf_hold_by_dnode() 240 *dbp = NULL; in dmu_buf_hold_by_dnode() [all …]
|
H A D | spa_history.c | 89 dmu_buf_t *dbp; in spa_history_create_obj() local 102 VERIFY0(dmu_bonus_hold(mos, spa->spa_history, FTAG, &dbp)); in spa_history_create_obj() 103 ASSERT3U(dbp->db_size, >=, sizeof (spa_history_phys_t)); in spa_history_create_obj() 105 shpp = dbp->db_data; in spa_history_create_obj() 106 dmu_buf_will_dirty(dbp, tx); in spa_history_create_obj() 117 dmu_buf_rele(dbp, FTAG); in spa_history_create_obj() 257 dmu_buf_t *dbp; in spa_history_log_sync() local 277 VERIFY0(dmu_bonus_hold(mos, spa->spa_history, FTAG, &dbp)); in spa_history_log_sync() 278 shpp = dbp->db_data; in spa_history_log_sync() 280 dmu_buf_will_dirty(dbp, tx); in spa_history_log_sync() [all …]
|
/freebsd/lib/libc/db/hash/ |
H A D | hash.c | 99 DB *dbp; in __hash_open() local 184 if (!(dbp = (DB *)malloc(sizeof(DB)))) { in __hash_open() 190 dbp->internal = hashp; in __hash_open() 191 dbp->close = hash_close; in __hash_open() 192 dbp->del = hash_delete; in __hash_open() 193 dbp->fd = hash_fd; in __hash_open() 194 dbp->get = hash_get; in __hash_open() 195 dbp->put = hash_put; in __hash_open() 196 dbp->seq = hash_seq; in __hash_open() 197 dbp->sync = hash_sync; in __hash_open() [all …]
|
/freebsd/lib/libc/db/btree/ |
H A D | bt_close.c | 54 * dbp: pointer to access method 60 __bt_close(DB *dbp) in __bt_close() argument 65 t = dbp->internal; in __bt_close() 74 if (__bt_sync(dbp, 0) == RET_ERROR) in __bt_close() 100 free(dbp); in __bt_close() 108 * dbp: pointer to access method 114 __bt_sync(const DB *dbp, u_int flags) in __bt_sync() argument 119 t = dbp->internal; in __bt_sync()
|
H A D | bt_open.c | 93 DB *dbp; in __bt_open() local 165 if ((t->bt_dbp = dbp = (DB *)calloc(1, sizeof(DB))) == NULL) in __bt_open() 170 dbp->type = DB_BTREE; in __bt_open() 171 dbp->internal = t; in __bt_open() 172 dbp->close = __bt_close; in __bt_open() 173 dbp->del = __bt_delete; in __bt_open() 174 dbp->fd = __bt_fd; in __bt_open() 175 dbp->get = __bt_get; in __bt_open() 176 dbp->put = __bt_put; in __bt_open() 177 dbp->seq = __bt_seq; in __bt_open() [all …]
|