1/* Do not edit: automatically built by gen_rec.awk. */ 2 3#include "db_config.h" 4 5#include "db_int.h" 6#include "dbinc/crypto.h" 7#include "dbinc/db_page.h" 8#include "dbinc/db_dispatch.h" 9#include "dbinc/db_am.h" 10#include "dbinc/log.h" 11#include "dbinc/txn.h" 12 13/* 14 * PUBLIC: int __db_addrem_print __P((ENV *, DBT *, DB_LSN *, 15 * PUBLIC: db_recops, void *)); 16 */ 17int 18__db_addrem_print(env, dbtp, lsnp, notused2, notused3) 19 ENV *env; 20 DBT *dbtp; 21 DB_LSN *lsnp; 22 db_recops notused2; 23 void *notused3; 24{ 25 __db_addrem_args *argp; 26 u_int32_t i; 27 int ch; 28 int ret; 29 30 notused2 = DB_TXN_PRINT; 31 notused3 = NULL; 32 33 if ((ret = 34 __db_addrem_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 35 return (ret); 36 (void)printf( 37 "[%lu][%lu]__db_addrem%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 38 (u_long)lsnp->file, (u_long)lsnp->offset, 39 (argp->type & DB_debug_FLAG) ? "_debug" : "", 40 (u_long)argp->type, 41 (u_long)argp->txnp->txnid, 42 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 43 (void)printf("\topcode: %lu\n", (u_long)argp->opcode); 44 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 45 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 46 (void)printf("\tindx: %lu\n", (u_long)argp->indx); 47 (void)printf("\tnbytes: %lu\n", (u_long)argp->nbytes); 48 (void)printf("\thdr: "); 49 for (i = 0; i < argp->hdr.size; i++) { 50 ch = ((u_int8_t *)argp->hdr.data)[i]; 51 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 52 } 53 (void)printf("\n"); 54 (void)printf("\tdbt: "); 55 for (i = 0; i < argp->dbt.size; i++) { 56 ch = ((u_int8_t *)argp->dbt.data)[i]; 57 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 58 } 59 (void)printf("\n"); 60 (void)printf("\tpagelsn: [%lu][%lu]\n", 61 (u_long)argp->pagelsn.file, (u_long)argp->pagelsn.offset); 62 (void)printf("\n"); 63 __os_free(env, argp); 64 return (0); 65} 66 67/* 68 * PUBLIC: int __db_big_print __P((ENV *, DBT *, DB_LSN *, db_recops, void *)); 69 */ 70int 71__db_big_print(env, dbtp, lsnp, notused2, notused3) 72 ENV *env; 73 DBT *dbtp; 74 DB_LSN *lsnp; 75 db_recops notused2; 76 void *notused3; 77{ 78 __db_big_args *argp; 79 u_int32_t i; 80 int ch; 81 int ret; 82 83 notused2 = DB_TXN_PRINT; 84 notused3 = NULL; 85 86 if ((ret = 87 __db_big_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 88 return (ret); 89 (void)printf( 90 "[%lu][%lu]__db_big%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 91 (u_long)lsnp->file, (u_long)lsnp->offset, 92 (argp->type & DB_debug_FLAG) ? "_debug" : "", 93 (u_long)argp->type, 94 (u_long)argp->txnp->txnid, 95 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 96 (void)printf("\topcode: %lu\n", (u_long)argp->opcode); 97 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 98 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 99 (void)printf("\tprev_pgno: %lu\n", (u_long)argp->prev_pgno); 100 (void)printf("\tnext_pgno: %lu\n", (u_long)argp->next_pgno); 101 (void)printf("\tdbt: "); 102 for (i = 0; i < argp->dbt.size; i++) { 103 ch = ((u_int8_t *)argp->dbt.data)[i]; 104 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 105 } 106 (void)printf("\n"); 107 (void)printf("\tpagelsn: [%lu][%lu]\n", 108 (u_long)argp->pagelsn.file, (u_long)argp->pagelsn.offset); 109 (void)printf("\tprevlsn: [%lu][%lu]\n", 110 (u_long)argp->prevlsn.file, (u_long)argp->prevlsn.offset); 111 (void)printf("\tnextlsn: [%lu][%lu]\n", 112 (u_long)argp->nextlsn.file, (u_long)argp->nextlsn.offset); 113 (void)printf("\n"); 114 __os_free(env, argp); 115 return (0); 116} 117 118/* 119 * PUBLIC: int __db_ovref_print __P((ENV *, DBT *, DB_LSN *, 120 * PUBLIC: db_recops, void *)); 121 */ 122int 123__db_ovref_print(env, dbtp, lsnp, notused2, notused3) 124 ENV *env; 125 DBT *dbtp; 126 DB_LSN *lsnp; 127 db_recops notused2; 128 void *notused3; 129{ 130 __db_ovref_args *argp; 131 int ret; 132 133 notused2 = DB_TXN_PRINT; 134 notused3 = NULL; 135 136 if ((ret = 137 __db_ovref_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 138 return (ret); 139 (void)printf( 140 "[%lu][%lu]__db_ovref%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 141 (u_long)lsnp->file, (u_long)lsnp->offset, 142 (argp->type & DB_debug_FLAG) ? "_debug" : "", 143 (u_long)argp->type, 144 (u_long)argp->txnp->txnid, 145 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 146 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 147 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 148 (void)printf("\tadjust: %ld\n", (long)argp->adjust); 149 (void)printf("\tlsn: [%lu][%lu]\n", 150 (u_long)argp->lsn.file, (u_long)argp->lsn.offset); 151 (void)printf("\n"); 152 __os_free(env, argp); 153 return (0); 154} 155 156/* 157 * PUBLIC: int __db_relink_42_print __P((ENV *, DBT *, DB_LSN *, 158 * PUBLIC: db_recops, void *)); 159 */ 160int 161__db_relink_42_print(env, dbtp, lsnp, notused2, notused3) 162 ENV *env; 163 DBT *dbtp; 164 DB_LSN *lsnp; 165 db_recops notused2; 166 void *notused3; 167{ 168 __db_relink_42_args *argp; 169 int ret; 170 171 notused2 = DB_TXN_PRINT; 172 notused3 = NULL; 173 174 if ((ret = 175 __db_relink_42_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 176 return (ret); 177 (void)printf( 178 "[%lu][%lu]__db_relink_42%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 179 (u_long)lsnp->file, (u_long)lsnp->offset, 180 (argp->type & DB_debug_FLAG) ? "_debug" : "", 181 (u_long)argp->type, 182 (u_long)argp->txnp->txnid, 183 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 184 (void)printf("\topcode: %lu\n", (u_long)argp->opcode); 185 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 186 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 187 (void)printf("\tlsn: [%lu][%lu]\n", 188 (u_long)argp->lsn.file, (u_long)argp->lsn.offset); 189 (void)printf("\tprev: %lu\n", (u_long)argp->prev); 190 (void)printf("\tlsn_prev: [%lu][%lu]\n", 191 (u_long)argp->lsn_prev.file, (u_long)argp->lsn_prev.offset); 192 (void)printf("\tnext: %lu\n", (u_long)argp->next); 193 (void)printf("\tlsn_next: [%lu][%lu]\n", 194 (u_long)argp->lsn_next.file, (u_long)argp->lsn_next.offset); 195 (void)printf("\n"); 196 __os_free(env, argp); 197 return (0); 198} 199 200/* 201 * PUBLIC: int __db_debug_print __P((ENV *, DBT *, DB_LSN *, 202 * PUBLIC: db_recops, void *)); 203 */ 204int 205__db_debug_print(env, dbtp, lsnp, notused2, notused3) 206 ENV *env; 207 DBT *dbtp; 208 DB_LSN *lsnp; 209 db_recops notused2; 210 void *notused3; 211{ 212 __db_debug_args *argp; 213 u_int32_t i; 214 int ch; 215 int ret; 216 217 notused2 = DB_TXN_PRINT; 218 notused3 = NULL; 219 220 if ((ret = __db_debug_read(env, dbtp->data, &argp)) != 0) 221 return (ret); 222 (void)printf( 223 "[%lu][%lu]__db_debug%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 224 (u_long)lsnp->file, (u_long)lsnp->offset, 225 (argp->type & DB_debug_FLAG) ? "_debug" : "", 226 (u_long)argp->type, 227 (u_long)argp->txnp->txnid, 228 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 229 (void)printf("\top: "); 230 for (i = 0; i < argp->op.size; i++) { 231 ch = ((u_int8_t *)argp->op.data)[i]; 232 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 233 } 234 (void)printf("\n"); 235 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 236 (void)printf("\tkey: "); 237 for (i = 0; i < argp->key.size; i++) { 238 ch = ((u_int8_t *)argp->key.data)[i]; 239 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 240 } 241 (void)printf("\n"); 242 (void)printf("\tdata: "); 243 for (i = 0; i < argp->data.size; i++) { 244 ch = ((u_int8_t *)argp->data.data)[i]; 245 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 246 } 247 (void)printf("\n"); 248 (void)printf("\targ_flags: %lu\n", (u_long)argp->arg_flags); 249 (void)printf("\n"); 250 __os_free(env, argp); 251 return (0); 252} 253 254/* 255 * PUBLIC: int __db_noop_print __P((ENV *, DBT *, DB_LSN *, 256 * PUBLIC: db_recops, void *)); 257 */ 258int 259__db_noop_print(env, dbtp, lsnp, notused2, notused3) 260 ENV *env; 261 DBT *dbtp; 262 DB_LSN *lsnp; 263 db_recops notused2; 264 void *notused3; 265{ 266 __db_noop_args *argp; 267 int ret; 268 269 notused2 = DB_TXN_PRINT; 270 notused3 = NULL; 271 272 if ((ret = 273 __db_noop_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 274 return (ret); 275 (void)printf( 276 "[%lu][%lu]__db_noop%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 277 (u_long)lsnp->file, (u_long)lsnp->offset, 278 (argp->type & DB_debug_FLAG) ? "_debug" : "", 279 (u_long)argp->type, 280 (u_long)argp->txnp->txnid, 281 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 282 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 283 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 284 (void)printf("\tprevlsn: [%lu][%lu]\n", 285 (u_long)argp->prevlsn.file, (u_long)argp->prevlsn.offset); 286 (void)printf("\n"); 287 __os_free(env, argp); 288 return (0); 289} 290 291/* 292 * PUBLIC: int __db_pg_alloc_42_print __P((ENV *, DBT *, DB_LSN *, 293 * PUBLIC: db_recops, void *)); 294 */ 295int 296__db_pg_alloc_42_print(env, dbtp, lsnp, notused2, notused3) 297 ENV *env; 298 DBT *dbtp; 299 DB_LSN *lsnp; 300 db_recops notused2; 301 void *notused3; 302{ 303 __db_pg_alloc_42_args *argp; 304 int ret; 305 306 notused2 = DB_TXN_PRINT; 307 notused3 = NULL; 308 309 if ((ret = 310 __db_pg_alloc_42_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 311 return (ret); 312 (void)printf( 313 "[%lu][%lu]__db_pg_alloc_42%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 314 (u_long)lsnp->file, (u_long)lsnp->offset, 315 (argp->type & DB_debug_FLAG) ? "_debug" : "", 316 (u_long)argp->type, 317 (u_long)argp->txnp->txnid, 318 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 319 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 320 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 321 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 322 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 323 (void)printf("\tpage_lsn: [%lu][%lu]\n", 324 (u_long)argp->page_lsn.file, (u_long)argp->page_lsn.offset); 325 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 326 (void)printf("\tptype: %lu\n", (u_long)argp->ptype); 327 (void)printf("\tnext: %lu\n", (u_long)argp->next); 328 (void)printf("\n"); 329 __os_free(env, argp); 330 return (0); 331} 332 333/* 334 * PUBLIC: int __db_pg_alloc_print __P((ENV *, DBT *, DB_LSN *, 335 * PUBLIC: db_recops, void *)); 336 */ 337int 338__db_pg_alloc_print(env, dbtp, lsnp, notused2, notused3) 339 ENV *env; 340 DBT *dbtp; 341 DB_LSN *lsnp; 342 db_recops notused2; 343 void *notused3; 344{ 345 __db_pg_alloc_args *argp; 346 int ret; 347 348 notused2 = DB_TXN_PRINT; 349 notused3 = NULL; 350 351 if ((ret = 352 __db_pg_alloc_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 353 return (ret); 354 (void)printf( 355 "[%lu][%lu]__db_pg_alloc%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 356 (u_long)lsnp->file, (u_long)lsnp->offset, 357 (argp->type & DB_debug_FLAG) ? "_debug" : "", 358 (u_long)argp->type, 359 (u_long)argp->txnp->txnid, 360 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 361 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 362 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 363 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 364 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 365 (void)printf("\tpage_lsn: [%lu][%lu]\n", 366 (u_long)argp->page_lsn.file, (u_long)argp->page_lsn.offset); 367 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 368 (void)printf("\tptype: %lu\n", (u_long)argp->ptype); 369 (void)printf("\tnext: %lu\n", (u_long)argp->next); 370 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno); 371 (void)printf("\n"); 372 __os_free(env, argp); 373 return (0); 374} 375 376/* 377 * PUBLIC: int __db_pg_free_42_print __P((ENV *, DBT *, DB_LSN *, 378 * PUBLIC: db_recops, void *)); 379 */ 380int 381__db_pg_free_42_print(env, dbtp, lsnp, notused2, notused3) 382 ENV *env; 383 DBT *dbtp; 384 DB_LSN *lsnp; 385 db_recops notused2; 386 void *notused3; 387{ 388 __db_pg_free_42_args *argp; 389 u_int32_t i; 390 int ch; 391 int ret; 392 393 notused2 = DB_TXN_PRINT; 394 notused3 = NULL; 395 396 if ((ret = 397 __db_pg_free_42_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 398 return (ret); 399 (void)printf( 400 "[%lu][%lu]__db_pg_free_42%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 401 (u_long)lsnp->file, (u_long)lsnp->offset, 402 (argp->type & DB_debug_FLAG) ? "_debug" : "", 403 (u_long)argp->type, 404 (u_long)argp->txnp->txnid, 405 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 406 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 407 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 408 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 409 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 410 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 411 (void)printf("\theader: "); 412 for (i = 0; i < argp->header.size; i++) { 413 ch = ((u_int8_t *)argp->header.data)[i]; 414 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 415 } 416 (void)printf("\n"); 417 (void)printf("\tnext: %lu\n", (u_long)argp->next); 418 (void)printf("\n"); 419 __os_free(env, argp); 420 return (0); 421} 422 423/* 424 * PUBLIC: int __db_pg_free_print __P((ENV *, DBT *, DB_LSN *, 425 * PUBLIC: db_recops, void *)); 426 */ 427int 428__db_pg_free_print(env, dbtp, lsnp, notused2, notused3) 429 ENV *env; 430 DBT *dbtp; 431 DB_LSN *lsnp; 432 db_recops notused2; 433 void *notused3; 434{ 435 __db_pg_free_args *argp; 436 u_int32_t i; 437 int ch; 438 int ret; 439 440 notused2 = DB_TXN_PRINT; 441 notused3 = NULL; 442 443 if ((ret = 444 __db_pg_free_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 445 return (ret); 446 (void)printf( 447 "[%lu][%lu]__db_pg_free%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 448 (u_long)lsnp->file, (u_long)lsnp->offset, 449 (argp->type & DB_debug_FLAG) ? "_debug" : "", 450 (u_long)argp->type, 451 (u_long)argp->txnp->txnid, 452 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 453 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 454 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 455 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 456 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 457 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 458 (void)printf("\theader: "); 459 for (i = 0; i < argp->header.size; i++) { 460 ch = ((u_int8_t *)argp->header.data)[i]; 461 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 462 } 463 (void)printf("\n"); 464 (void)printf("\tnext: %lu\n", (u_long)argp->next); 465 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno); 466 (void)printf("\n"); 467 __os_free(env, argp); 468 return (0); 469} 470 471/* 472 * PUBLIC: int __db_cksum_print __P((ENV *, DBT *, DB_LSN *, 473 * PUBLIC: db_recops, void *)); 474 */ 475int 476__db_cksum_print(env, dbtp, lsnp, notused2, notused3) 477 ENV *env; 478 DBT *dbtp; 479 DB_LSN *lsnp; 480 db_recops notused2; 481 void *notused3; 482{ 483 __db_cksum_args *argp; 484 int ret; 485 486 notused2 = DB_TXN_PRINT; 487 notused3 = NULL; 488 489 if ((ret = __db_cksum_read(env, dbtp->data, &argp)) != 0) 490 return (ret); 491 (void)printf( 492 "[%lu][%lu]__db_cksum%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 493 (u_long)lsnp->file, (u_long)lsnp->offset, 494 (argp->type & DB_debug_FLAG) ? "_debug" : "", 495 (u_long)argp->type, 496 (u_long)argp->txnp->txnid, 497 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 498 (void)printf("\n"); 499 __os_free(env, argp); 500 return (0); 501} 502 503/* 504 * PUBLIC: int __db_pg_freedata_42_print __P((ENV *, DBT *, DB_LSN *, 505 * PUBLIC: db_recops, void *)); 506 */ 507int 508__db_pg_freedata_42_print(env, dbtp, lsnp, notused2, notused3) 509 ENV *env; 510 DBT *dbtp; 511 DB_LSN *lsnp; 512 db_recops notused2; 513 void *notused3; 514{ 515 __db_pg_freedata_42_args *argp; 516 u_int32_t i; 517 int ch; 518 int ret; 519 520 notused2 = DB_TXN_PRINT; 521 notused3 = NULL; 522 523 if ((ret = 524 __db_pg_freedata_42_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 525 return (ret); 526 (void)printf( 527 "[%lu][%lu]__db_pg_freedata_42%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 528 (u_long)lsnp->file, (u_long)lsnp->offset, 529 (argp->type & DB_debug_FLAG) ? "_debug" : "", 530 (u_long)argp->type, 531 (u_long)argp->txnp->txnid, 532 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 533 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 534 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 535 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 536 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 537 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 538 (void)printf("\theader: "); 539 for (i = 0; i < argp->header.size; i++) { 540 ch = ((u_int8_t *)argp->header.data)[i]; 541 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 542 } 543 (void)printf("\n"); 544 (void)printf("\tnext: %lu\n", (u_long)argp->next); 545 (void)printf("\tdata: "); 546 for (i = 0; i < argp->data.size; i++) { 547 ch = ((u_int8_t *)argp->data.data)[i]; 548 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 549 } 550 (void)printf("\n"); 551 (void)printf("\n"); 552 __os_free(env, argp); 553 return (0); 554} 555 556/* 557 * PUBLIC: int __db_pg_freedata_print __P((ENV *, DBT *, DB_LSN *, 558 * PUBLIC: db_recops, void *)); 559 */ 560int 561__db_pg_freedata_print(env, dbtp, lsnp, notused2, notused3) 562 ENV *env; 563 DBT *dbtp; 564 DB_LSN *lsnp; 565 db_recops notused2; 566 void *notused3; 567{ 568 __db_pg_freedata_args *argp; 569 u_int32_t i; 570 int ch; 571 int ret; 572 573 notused2 = DB_TXN_PRINT; 574 notused3 = NULL; 575 576 if ((ret = 577 __db_pg_freedata_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 578 return (ret); 579 (void)printf( 580 "[%lu][%lu]__db_pg_freedata%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 581 (u_long)lsnp->file, (u_long)lsnp->offset, 582 (argp->type & DB_debug_FLAG) ? "_debug" : "", 583 (u_long)argp->type, 584 (u_long)argp->txnp->txnid, 585 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 586 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 587 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 588 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 589 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 590 (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno); 591 (void)printf("\theader: "); 592 for (i = 0; i < argp->header.size; i++) { 593 ch = ((u_int8_t *)argp->header.data)[i]; 594 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 595 } 596 (void)printf("\n"); 597 (void)printf("\tnext: %lu\n", (u_long)argp->next); 598 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno); 599 (void)printf("\tdata: "); 600 for (i = 0; i < argp->data.size; i++) { 601 ch = ((u_int8_t *)argp->data.data)[i]; 602 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 603 } 604 (void)printf("\n"); 605 (void)printf("\n"); 606 __os_free(env, argp); 607 return (0); 608} 609 610/* 611 * PUBLIC: int __db_pg_init_print __P((ENV *, DBT *, DB_LSN *, 612 * PUBLIC: db_recops, void *)); 613 */ 614int 615__db_pg_init_print(env, dbtp, lsnp, notused2, notused3) 616 ENV *env; 617 DBT *dbtp; 618 DB_LSN *lsnp; 619 db_recops notused2; 620 void *notused3; 621{ 622 __db_pg_init_args *argp; 623 u_int32_t i; 624 int ch; 625 int ret; 626 627 notused2 = DB_TXN_PRINT; 628 notused3 = NULL; 629 630 if ((ret = 631 __db_pg_init_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 632 return (ret); 633 (void)printf( 634 "[%lu][%lu]__db_pg_init%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 635 (u_long)lsnp->file, (u_long)lsnp->offset, 636 (argp->type & DB_debug_FLAG) ? "_debug" : "", 637 (u_long)argp->type, 638 (u_long)argp->txnp->txnid, 639 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 640 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 641 (void)printf("\tpgno: %lu\n", (u_long)argp->pgno); 642 (void)printf("\theader: "); 643 for (i = 0; i < argp->header.size; i++) { 644 ch = ((u_int8_t *)argp->header.data)[i]; 645 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 646 } 647 (void)printf("\n"); 648 (void)printf("\tdata: "); 649 for (i = 0; i < argp->data.size; i++) { 650 ch = ((u_int8_t *)argp->data.data)[i]; 651 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 652 } 653 (void)printf("\n"); 654 (void)printf("\n"); 655 __os_free(env, argp); 656 return (0); 657} 658 659/* 660 * PUBLIC: int __db_pg_sort_print __P((ENV *, DBT *, DB_LSN *, 661 * PUBLIC: db_recops, void *)); 662 */ 663int 664__db_pg_sort_print(env, dbtp, lsnp, notused2, notused3) 665 ENV *env; 666 DBT *dbtp; 667 DB_LSN *lsnp; 668 db_recops notused2; 669 void *notused3; 670{ 671 __db_pg_sort_args *argp; 672 u_int32_t i; 673 int ch; 674 int ret; 675 676 notused2 = DB_TXN_PRINT; 677 notused3 = NULL; 678 679 if ((ret = 680 __db_pg_sort_read(env, NULL, NULL, dbtp->data, &argp)) != 0) 681 return (ret); 682 (void)printf( 683 "[%lu][%lu]__db_pg_sort%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 684 (u_long)lsnp->file, (u_long)lsnp->offset, 685 (argp->type & DB_debug_FLAG) ? "_debug" : "", 686 (u_long)argp->type, 687 (u_long)argp->txnp->txnid, 688 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 689 (void)printf("\tfileid: %ld\n", (long)argp->fileid); 690 (void)printf("\tmeta: %lu\n", (u_long)argp->meta); 691 (void)printf("\tmeta_lsn: [%lu][%lu]\n", 692 (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset); 693 (void)printf("\tlast_free: %lu\n", (u_long)argp->last_free); 694 (void)printf("\tlast_lsn: [%lu][%lu]\n", 695 (u_long)argp->last_lsn.file, (u_long)argp->last_lsn.offset); 696 (void)printf("\tlast_pgno: %lu\n", (u_long)argp->last_pgno); 697 (void)printf("\tlist: "); 698 for (i = 0; i < argp->list.size; i++) { 699 ch = ((u_int8_t *)argp->list.data)[i]; 700 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 701 } 702 (void)printf("\n"); 703 (void)printf("\n"); 704 __os_free(env, argp); 705 return (0); 706} 707 708/* 709 * PUBLIC: int __db_init_print __P((ENV *, DB_DISTAB *)); 710 */ 711int 712__db_init_print(env, dtabp) 713 ENV *env; 714 DB_DISTAB *dtabp; 715{ 716 int ret; 717 718 if ((ret = __db_add_recovery_int(env, dtabp, 719 __db_addrem_print, DB___db_addrem)) != 0) 720 return (ret); 721 if ((ret = __db_add_recovery_int(env, dtabp, 722 __db_big_print, DB___db_big)) != 0) 723 return (ret); 724 if ((ret = __db_add_recovery_int(env, dtabp, 725 __db_ovref_print, DB___db_ovref)) != 0) 726 return (ret); 727 if ((ret = __db_add_recovery_int(env, dtabp, 728 __db_debug_print, DB___db_debug)) != 0) 729 return (ret); 730 if ((ret = __db_add_recovery_int(env, dtabp, 731 __db_noop_print, DB___db_noop)) != 0) 732 return (ret); 733 if ((ret = __db_add_recovery_int(env, dtabp, 734 __db_pg_alloc_print, DB___db_pg_alloc)) != 0) 735 return (ret); 736 if ((ret = __db_add_recovery_int(env, dtabp, 737 __db_pg_free_print, DB___db_pg_free)) != 0) 738 return (ret); 739 if ((ret = __db_add_recovery_int(env, dtabp, 740 __db_cksum_print, DB___db_cksum)) != 0) 741 return (ret); 742 if ((ret = __db_add_recovery_int(env, dtabp, 743 __db_pg_freedata_print, DB___db_pg_freedata)) != 0) 744 return (ret); 745 if ((ret = __db_add_recovery_int(env, dtabp, 746 __db_pg_init_print, DB___db_pg_init)) != 0) 747 return (ret); 748 if ((ret = __db_add_recovery_int(env, dtabp, 749 __db_pg_sort_print, DB___db_pg_sort)) != 0) 750 return (ret); 751 return (0); 752} 753