00001
00002
00003 #include "db_config.h"
00004
00005 #ifndef NO_SYSTEM_INCLUDES
00006 #include <sys/types.h>
00007
00008 #include <ctype.h>
00009 #include <string.h>
00010 #endif
00011
00012 #include "db_int.h"
00013 #include "dbinc/crypto.h"
00014 #include "dbinc/db_page.h"
00015 #include "dbinc/db_dispatch.h"
00016 #include "dbinc/db_am.h"
00017 #include "dbinc/log.h"
00018 #include "dbinc/txn.h"
00019
00020
00021
00022
00023
00024 int
00025 __db_addrem_print(dbenv, dbtp, lsnp, notused2, notused3)
00026 DB_ENV *dbenv;
00027 DBT *dbtp;
00028 DB_LSN *lsnp;
00029 db_recops notused2;
00030 void *notused3;
00031 {
00032 __db_addrem_args *argp;
00033 u_int32_t i;
00034 int ch;
00035 int ret;
00036
00037 notused2 = DB_TXN_PRINT;
00038 notused3 = NULL;
00039
00040 if ((ret = __db_addrem_read(dbenv, dbtp->data, &argp)) != 0)
00041 return (ret);
00042 (void)printf(
00043 "[%lu][%lu]__db_addrem%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00044 (u_long)lsnp->file,
00045 (u_long)lsnp->offset,
00046 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00047 (u_long)argp->type,
00048 (u_long)argp->txnid->txnid,
00049 (u_long)argp->prev_lsn.file,
00050 (u_long)argp->prev_lsn.offset);
00051 (void)printf("\topcode: %lu\n", (u_long)argp->opcode);
00052 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00053 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00054 (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00055 (void)printf("\tnbytes: %lu\n", (u_long)argp->nbytes);
00056 (void)printf("\thdr: ");
00057 for (i = 0; i < argp->hdr.size; i++) {
00058 ch = ((u_int8_t *)argp->hdr.data)[i];
00059 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00060 }
00061 (void)printf("\n");
00062 (void)printf("\tdbt: ");
00063 for (i = 0; i < argp->dbt.size; i++) {
00064 ch = ((u_int8_t *)argp->dbt.data)[i];
00065 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00066 }
00067 (void)printf("\n");
00068 (void)printf("\tpagelsn: [%lu][%lu]\n",
00069 (u_long)argp->pagelsn.file, (u_long)argp->pagelsn.offset);
00070 (void)printf("\n");
00071 __os_free(dbenv, argp);
00072 return (0);
00073 }
00074
00075
00076
00077
00078
00079 int
00080 __db_big_print(dbenv, dbtp, lsnp, notused2, notused3)
00081 DB_ENV *dbenv;
00082 DBT *dbtp;
00083 DB_LSN *lsnp;
00084 db_recops notused2;
00085 void *notused3;
00086 {
00087 __db_big_args *argp;
00088 u_int32_t i;
00089 int ch;
00090 int ret;
00091
00092 notused2 = DB_TXN_PRINT;
00093 notused3 = NULL;
00094
00095 if ((ret = __db_big_read(dbenv, dbtp->data, &argp)) != 0)
00096 return (ret);
00097 (void)printf(
00098 "[%lu][%lu]__db_big%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00099 (u_long)lsnp->file,
00100 (u_long)lsnp->offset,
00101 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00102 (u_long)argp->type,
00103 (u_long)argp->txnid->txnid,
00104 (u_long)argp->prev_lsn.file,
00105 (u_long)argp->prev_lsn.offset);
00106 (void)printf("\topcode: %lu\n", (u_long)argp->opcode);
00107 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00108 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00109 (void)printf("\tprev_pgno: %lu\n", (u_long)argp->prev_pgno);
00110 (void)printf("\tnext_pgno: %lu\n", (u_long)argp->next_pgno);
00111 (void)printf("\tdbt: ");
00112 for (i = 0; i < argp->dbt.size; i++) {
00113 ch = ((u_int8_t *)argp->dbt.data)[i];
00114 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00115 }
00116 (void)printf("\n");
00117 (void)printf("\tpagelsn: [%lu][%lu]\n",
00118 (u_long)argp->pagelsn.file, (u_long)argp->pagelsn.offset);
00119 (void)printf("\tprevlsn: [%lu][%lu]\n",
00120 (u_long)argp->prevlsn.file, (u_long)argp->prevlsn.offset);
00121 (void)printf("\tnextlsn: [%lu][%lu]\n",
00122 (u_long)argp->nextlsn.file, (u_long)argp->nextlsn.offset);
00123 (void)printf("\n");
00124 __os_free(dbenv, argp);
00125 return (0);
00126 }
00127
00128
00129
00130
00131
00132 int
00133 __db_ovref_print(dbenv, dbtp, lsnp, notused2, notused3)
00134 DB_ENV *dbenv;
00135 DBT *dbtp;
00136 DB_LSN *lsnp;
00137 db_recops notused2;
00138 void *notused3;
00139 {
00140 __db_ovref_args *argp;
00141 int ret;
00142
00143 notused2 = DB_TXN_PRINT;
00144 notused3 = NULL;
00145
00146 if ((ret = __db_ovref_read(dbenv, dbtp->data, &argp)) != 0)
00147 return (ret);
00148 (void)printf(
00149 "[%lu][%lu]__db_ovref%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00150 (u_long)lsnp->file,
00151 (u_long)lsnp->offset,
00152 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00153 (u_long)argp->type,
00154 (u_long)argp->txnid->txnid,
00155 (u_long)argp->prev_lsn.file,
00156 (u_long)argp->prev_lsn.offset);
00157 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00158 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00159 (void)printf("\tadjust: %ld\n", (long)argp->adjust);
00160 (void)printf("\tlsn: [%lu][%lu]\n",
00161 (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00162 (void)printf("\n");
00163 __os_free(dbenv, argp);
00164 return (0);
00165 }
00166
00167
00168
00169
00170
00171 int
00172 __db_debug_print(dbenv, dbtp, lsnp, notused2, notused3)
00173 DB_ENV *dbenv;
00174 DBT *dbtp;
00175 DB_LSN *lsnp;
00176 db_recops notused2;
00177 void *notused3;
00178 {
00179 __db_debug_args *argp;
00180 u_int32_t i;
00181 int ch;
00182 int ret;
00183
00184 notused2 = DB_TXN_PRINT;
00185 notused3 = NULL;
00186
00187 if ((ret = __db_debug_read(dbenv, dbtp->data, &argp)) != 0)
00188 return (ret);
00189 (void)printf(
00190 "[%lu][%lu]__db_debug%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00191 (u_long)lsnp->file,
00192 (u_long)lsnp->offset,
00193 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00194 (u_long)argp->type,
00195 (u_long)argp->txnid->txnid,
00196 (u_long)argp->prev_lsn.file,
00197 (u_long)argp->prev_lsn.offset);
00198 (void)printf("\top: ");
00199 for (i = 0; i < argp->op.size; i++) {
00200 ch = ((u_int8_t *)argp->op.data)[i];
00201 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00202 }
00203 (void)printf("\n");
00204 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00205 (void)printf("\tkey: ");
00206 for (i = 0; i < argp->key.size; i++) {
00207 ch = ((u_int8_t *)argp->key.data)[i];
00208 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00209 }
00210 (void)printf("\n");
00211 (void)printf("\tdata: ");
00212 for (i = 0; i < argp->data.size; i++) {
00213 ch = ((u_int8_t *)argp->data.data)[i];
00214 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00215 }
00216 (void)printf("\n");
00217 (void)printf("\targ_flags: %lu\n", (u_long)argp->arg_flags);
00218 (void)printf("\n");
00219 __os_free(dbenv, argp);
00220 return (0);
00221 }
00222
00223
00224
00225
00226
00227 int
00228 __db_noop_print(dbenv, dbtp, lsnp, notused2, notused3)
00229 DB_ENV *dbenv;
00230 DBT *dbtp;
00231 DB_LSN *lsnp;
00232 db_recops notused2;
00233 void *notused3;
00234 {
00235 __db_noop_args *argp;
00236 int ret;
00237
00238 notused2 = DB_TXN_PRINT;
00239 notused3 = NULL;
00240
00241 if ((ret = __db_noop_read(dbenv, dbtp->data, &argp)) != 0)
00242 return (ret);
00243 (void)printf(
00244 "[%lu][%lu]__db_noop%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00245 (u_long)lsnp->file,
00246 (u_long)lsnp->offset,
00247 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00248 (u_long)argp->type,
00249 (u_long)argp->txnid->txnid,
00250 (u_long)argp->prev_lsn.file,
00251 (u_long)argp->prev_lsn.offset);
00252 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00253 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00254 (void)printf("\tprevlsn: [%lu][%lu]\n",
00255 (u_long)argp->prevlsn.file, (u_long)argp->prevlsn.offset);
00256 (void)printf("\n");
00257 __os_free(dbenv, argp);
00258 return (0);
00259 }
00260
00261
00262
00263
00264
00265 int
00266 __db_pg_alloc_print(dbenv, dbtp, lsnp, notused2, notused3)
00267 DB_ENV *dbenv;
00268 DBT *dbtp;
00269 DB_LSN *lsnp;
00270 db_recops notused2;
00271 void *notused3;
00272 {
00273 __db_pg_alloc_args *argp;
00274 int ret;
00275
00276 notused2 = DB_TXN_PRINT;
00277 notused3 = NULL;
00278
00279 if ((ret = __db_pg_alloc_read(dbenv, dbtp->data, &argp)) != 0)
00280 return (ret);
00281 (void)printf(
00282 "[%lu][%lu]__db_pg_alloc%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00283 (u_long)lsnp->file,
00284 (u_long)lsnp->offset,
00285 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00286 (u_long)argp->type,
00287 (u_long)argp->txnid->txnid,
00288 (u_long)argp->prev_lsn.file,
00289 (u_long)argp->prev_lsn.offset);
00290 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00291 (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00292 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00293 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00294 (void)printf("\tpage_lsn: [%lu][%lu]\n",
00295 (u_long)argp->page_lsn.file, (u_long)argp->page_lsn.offset);
00296 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00297 (void)printf("\tptype: %lu\n", (u_long)argp->ptype);
00298 (void)printf("\tnext: %lu\n", (u_long)argp->next);
00299 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno);
00300 (void)printf("\n");
00301 __os_free(dbenv, argp);
00302 return (0);
00303 }
00304
00305
00306
00307
00308
00309 int
00310 __db_pg_free_print(dbenv, dbtp, lsnp, notused2, notused3)
00311 DB_ENV *dbenv;
00312 DBT *dbtp;
00313 DB_LSN *lsnp;
00314 db_recops notused2;
00315 void *notused3;
00316 {
00317 __db_pg_free_args *argp;
00318 u_int32_t i;
00319 int ch;
00320 int ret;
00321
00322 notused2 = DB_TXN_PRINT;
00323 notused3 = NULL;
00324
00325 if ((ret = __db_pg_free_read(dbenv, dbtp->data, &argp)) != 0)
00326 return (ret);
00327 (void)printf(
00328 "[%lu][%lu]__db_pg_free%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00329 (u_long)lsnp->file,
00330 (u_long)lsnp->offset,
00331 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00332 (u_long)argp->type,
00333 (u_long)argp->txnid->txnid,
00334 (u_long)argp->prev_lsn.file,
00335 (u_long)argp->prev_lsn.offset);
00336 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00337 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00338 (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00339 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00340 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00341 (void)printf("\theader: ");
00342 for (i = 0; i < argp->header.size; i++) {
00343 ch = ((u_int8_t *)argp->header.data)[i];
00344 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00345 }
00346 (void)printf("\n");
00347 (void)printf("\tnext: %lu\n", (u_long)argp->next);
00348 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno);
00349 (void)printf("\n");
00350 __os_free(dbenv, argp);
00351 return (0);
00352 }
00353
00354
00355
00356
00357
00358 int
00359 __db_cksum_print(dbenv, dbtp, lsnp, notused2, notused3)
00360 DB_ENV *dbenv;
00361 DBT *dbtp;
00362 DB_LSN *lsnp;
00363 db_recops notused2;
00364 void *notused3;
00365 {
00366 __db_cksum_args *argp;
00367 int ret;
00368
00369 notused2 = DB_TXN_PRINT;
00370 notused3 = NULL;
00371
00372 if ((ret = __db_cksum_read(dbenv, dbtp->data, &argp)) != 0)
00373 return (ret);
00374 (void)printf(
00375 "[%lu][%lu]__db_cksum%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00376 (u_long)lsnp->file,
00377 (u_long)lsnp->offset,
00378 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00379 (u_long)argp->type,
00380 (u_long)argp->txnid->txnid,
00381 (u_long)argp->prev_lsn.file,
00382 (u_long)argp->prev_lsn.offset);
00383 (void)printf("\n");
00384 __os_free(dbenv, argp);
00385 return (0);
00386 }
00387
00388
00389
00390
00391
00392 int
00393 __db_pg_freedata_print(dbenv, dbtp, lsnp, notused2, notused3)
00394 DB_ENV *dbenv;
00395 DBT *dbtp;
00396 DB_LSN *lsnp;
00397 db_recops notused2;
00398 void *notused3;
00399 {
00400 __db_pg_freedata_args *argp;
00401 u_int32_t i;
00402 int ch;
00403 int ret;
00404
00405 notused2 = DB_TXN_PRINT;
00406 notused3 = NULL;
00407
00408 if ((ret = __db_pg_freedata_read(dbenv, dbtp->data, &argp)) != 0)
00409 return (ret);
00410 (void)printf(
00411 "[%lu][%lu]__db_pg_freedata%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00412 (u_long)lsnp->file,
00413 (u_long)lsnp->offset,
00414 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00415 (u_long)argp->type,
00416 (u_long)argp->txnid->txnid,
00417 (u_long)argp->prev_lsn.file,
00418 (u_long)argp->prev_lsn.offset);
00419 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00420 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00421 (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00422 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00423 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00424 (void)printf("\theader: ");
00425 for (i = 0; i < argp->header.size; i++) {
00426 ch = ((u_int8_t *)argp->header.data)[i];
00427 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00428 }
00429 (void)printf("\n");
00430 (void)printf("\tnext: %lu\n", (u_long)argp->next);
00431 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno);
00432 (void)printf("\tdata: ");
00433 for (i = 0; i < argp->data.size; i++) {
00434 ch = ((u_int8_t *)argp->data.data)[i];
00435 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00436 }
00437 (void)printf("\n");
00438 (void)printf("\n");
00439 __os_free(dbenv, argp);
00440 return (0);
00441 }
00442
00443
00444
00445
00446
00447 int
00448 __db_pg_prepare_print(dbenv, dbtp, lsnp, notused2, notused3)
00449 DB_ENV *dbenv;
00450 DBT *dbtp;
00451 DB_LSN *lsnp;
00452 db_recops notused2;
00453 void *notused3;
00454 {
00455 __db_pg_prepare_args *argp;
00456 int ret;
00457
00458 notused2 = DB_TXN_PRINT;
00459 notused3 = NULL;
00460
00461 if ((ret = __db_pg_prepare_read(dbenv, dbtp->data, &argp)) != 0)
00462 return (ret);
00463 (void)printf(
00464 "[%lu][%lu]__db_pg_prepare%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00465 (u_long)lsnp->file,
00466 (u_long)lsnp->offset,
00467 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00468 (u_long)argp->type,
00469 (u_long)argp->txnid->txnid,
00470 (u_long)argp->prev_lsn.file,
00471 (u_long)argp->prev_lsn.offset);
00472 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00473 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00474 (void)printf("\n");
00475 __os_free(dbenv, argp);
00476 return (0);
00477 }
00478
00479
00480
00481
00482
00483 int
00484 __db_pg_new_print(dbenv, dbtp, lsnp, notused2, notused3)
00485 DB_ENV *dbenv;
00486 DBT *dbtp;
00487 DB_LSN *lsnp;
00488 db_recops notused2;
00489 void *notused3;
00490 {
00491 __db_pg_new_args *argp;
00492 u_int32_t i;
00493 int ch;
00494 int ret;
00495
00496 notused2 = DB_TXN_PRINT;
00497 notused3 = NULL;
00498
00499 if ((ret = __db_pg_new_read(dbenv, dbtp->data, &argp)) != 0)
00500 return (ret);
00501 (void)printf(
00502 "[%lu][%lu]__db_pg_new%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00503 (u_long)lsnp->file,
00504 (u_long)lsnp->offset,
00505 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00506 (u_long)argp->type,
00507 (u_long)argp->txnid->txnid,
00508 (u_long)argp->prev_lsn.file,
00509 (u_long)argp->prev_lsn.offset);
00510 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00511 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00512 (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00513 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00514 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00515 (void)printf("\theader: ");
00516 for (i = 0; i < argp->header.size; i++) {
00517 ch = ((u_int8_t *)argp->header.data)[i];
00518 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00519 }
00520 (void)printf("\n");
00521 (void)printf("\tnext: %lu\n", (u_long)argp->next);
00522 (void)printf("\n");
00523 __os_free(dbenv, argp);
00524 return (0);
00525 }
00526
00527
00528
00529
00530
00531 int
00532 __db_pg_init_print(dbenv, dbtp, lsnp, notused2, notused3)
00533 DB_ENV *dbenv;
00534 DBT *dbtp;
00535 DB_LSN *lsnp;
00536 db_recops notused2;
00537 void *notused3;
00538 {
00539 __db_pg_init_args *argp;
00540 u_int32_t i;
00541 int ch;
00542 int ret;
00543
00544 notused2 = DB_TXN_PRINT;
00545 notused3 = NULL;
00546
00547 if ((ret = __db_pg_init_read(dbenv, dbtp->data, &argp)) != 0)
00548 return (ret);
00549 (void)printf(
00550 "[%lu][%lu]__db_pg_init%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00551 (u_long)lsnp->file,
00552 (u_long)lsnp->offset,
00553 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00554 (u_long)argp->type,
00555 (u_long)argp->txnid->txnid,
00556 (u_long)argp->prev_lsn.file,
00557 (u_long)argp->prev_lsn.offset);
00558 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00559 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00560 (void)printf("\theader: ");
00561 for (i = 0; i < argp->header.size; i++) {
00562 ch = ((u_int8_t *)argp->header.data)[i];
00563 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00564 }
00565 (void)printf("\n");
00566 (void)printf("\tdata: ");
00567 for (i = 0; i < argp->data.size; i++) {
00568 ch = ((u_int8_t *)argp->data.data)[i];
00569 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00570 }
00571 (void)printf("\n");
00572 (void)printf("\n");
00573 __os_free(dbenv, argp);
00574 return (0);
00575 }
00576
00577
00578
00579
00580
00581 int
00582 __db_pg_sort_print(dbenv, dbtp, lsnp, notused2, notused3)
00583 DB_ENV *dbenv;
00584 DBT *dbtp;
00585 DB_LSN *lsnp;
00586 db_recops notused2;
00587 void *notused3;
00588 {
00589 __db_pg_sort_args *argp;
00590 u_int32_t i;
00591 int ch;
00592 int ret;
00593
00594 notused2 = DB_TXN_PRINT;
00595 notused3 = NULL;
00596
00597 if ((ret = __db_pg_sort_read(dbenv, dbtp->data, &argp)) != 0)
00598 return (ret);
00599 (void)printf(
00600 "[%lu][%lu]__db_pg_sort%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00601 (u_long)lsnp->file,
00602 (u_long)lsnp->offset,
00603 (argp->type & DB_debug_FLAG) ? "_debug" : "",
00604 (u_long)argp->type,
00605 (u_long)argp->txnid->txnid,
00606 (u_long)argp->prev_lsn.file,
00607 (u_long)argp->prev_lsn.offset);
00608 (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00609 (void)printf("\tmeta: %lu\n", (u_long)argp->meta);
00610 (void)printf("\tmeta_lsn: [%lu][%lu]\n",
00611 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
00612 (void)printf("\tlast_free: %lu\n", (u_long)argp->last_free);
00613 (void)printf("\tlast_lsn: [%lu][%lu]\n",
00614 (u_long)argp->last_lsn.file, (u_long)argp->last_lsn.offset);
00615 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno);
00616 (void)printf("\tlist: ");
00617 for (i = 0; i < argp->list.size; i++) {
00618 ch = ((u_int8_t *)argp->list.data)[i];
00619 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00620 }
00621 (void)printf("\n");
00622 (void)printf("\n");
00623 __os_free(dbenv, argp);
00624 return (0);
00625 }
00626
00627
00628
00629
00630
00631 int
00632 __db_init_print(dbenv, dtabp, dtabsizep)
00633 DB_ENV *dbenv;
00634 int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00635 size_t *dtabsizep;
00636 {
00637 int ret;
00638
00639 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00640 __db_addrem_print, DB___db_addrem)) != 0)
00641 return (ret);
00642 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00643 __db_big_print, DB___db_big)) != 0)
00644 return (ret);
00645 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00646 __db_ovref_print, DB___db_ovref)) != 0)
00647 return (ret);
00648 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00649 __db_debug_print, DB___db_debug)) != 0)
00650 return (ret);
00651 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00652 __db_noop_print, DB___db_noop)) != 0)
00653 return (ret);
00654 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00655 __db_pg_alloc_print, DB___db_pg_alloc)) != 0)
00656 return (ret);
00657 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00658 __db_pg_free_print, DB___db_pg_free)) != 0)
00659 return (ret);
00660 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00661 __db_cksum_print, DB___db_cksum)) != 0)
00662 return (ret);
00663 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00664 __db_pg_freedata_print, DB___db_pg_freedata)) != 0)
00665 return (ret);
00666 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00667 __db_pg_prepare_print, DB___db_pg_prepare)) != 0)
00668 return (ret);
00669 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00670 __db_pg_new_print, DB___db_pg_new)) != 0)
00671 return (ret);
00672 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00673 __db_pg_init_print, DB___db_pg_init)) != 0)
00674 return (ret);
00675 if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00676 __db_pg_sort_print, DB___db_pg_sort)) != 0)
00677 return (ret);
00678 return (0);
00679 }