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 __dbreg_register_print __P((ENV *, DBT *, DB_LSN *,
15 * PUBLIC:     db_recops, void *));
16 */
17int
18__dbreg_register_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	__dbreg_register_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 = __dbreg_register_read(env, dbtp->data, &argp)) != 0)
34		return (ret);
35	(void)printf(
36    "[%lu][%lu]__dbreg_register%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
37	    (u_long)lsnp->file, (u_long)lsnp->offset,
38	    (argp->type & DB_debug_FLAG) ? "_debug" : "",
39	    (u_long)argp->type,
40	    (u_long)argp->txnp->txnid,
41	    (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
42	(void)printf("\topcode: %lu\n", (u_long)argp->opcode);
43	(void)printf("\tname: ");
44	for (i = 0; i < argp->name.size; i++) {
45		ch = ((u_int8_t *)argp->name.data)[i];
46		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
47	}
48	(void)printf("\n");
49	(void)printf("\tuid: ");
50	for (i = 0; i < argp->uid.size; i++) {
51		ch = ((u_int8_t *)argp->uid.data)[i];
52		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
53	}
54	(void)printf("\n");
55	(void)printf("\tfileid: %ld\n", (long)argp->fileid);
56	(void)printf("\tftype: 0x%lx\n", (u_long)argp->ftype);
57	(void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
58	(void)printf("\tid: 0x%lx\n", (u_long)argp->id);
59	(void)printf("\n");
60	__os_free(env, argp);
61	return (0);
62}
63
64/*
65 * PUBLIC: int __dbreg_init_print __P((ENV *, DB_DISTAB *));
66 */
67int
68__dbreg_init_print(env, dtabp)
69	ENV *env;
70	DB_DISTAB *dtabp;
71{
72	int ret;
73
74	if ((ret = __db_add_recovery_int(env, dtabp,
75	    __dbreg_register_print, DB___dbreg_register)) != 0)
76		return (ret);
77	return (0);
78}
79