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 __crdel_metasub_print __P((ENV *, DBT *, DB_LSN *,
15 * PUBLIC:     db_recops, void *));
16 */
17int
18__crdel_metasub_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	__crdel_metasub_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	    __crdel_metasub_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
35		return (ret);
36	(void)printf(
37    "[%lu][%lu]__crdel_metasub%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("\tfileid: %ld\n", (long)argp->fileid);
44	(void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
45	(void)printf("\tpage: ");
46	for (i = 0; i < argp->page.size; i++) {
47		ch = ((u_int8_t *)argp->page.data)[i];
48		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
49	}
50	(void)printf("\n");
51	(void)printf("\tlsn: [%lu][%lu]\n",
52	    (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
53	(void)printf("\n");
54	__os_free(env, argp);
55	return (0);
56}
57
58/*
59 * PUBLIC: int __crdel_inmem_create_print __P((ENV *, DBT *,
60 * PUBLIC:     DB_LSN *, db_recops, void *));
61 */
62int
63__crdel_inmem_create_print(env, dbtp, lsnp, notused2, notused3)
64	ENV *env;
65	DBT *dbtp;
66	DB_LSN *lsnp;
67	db_recops notused2;
68	void *notused3;
69{
70	__crdel_inmem_create_args *argp;
71	u_int32_t i;
72	int ch;
73	int ret;
74
75	notused2 = DB_TXN_PRINT;
76	notused3 = NULL;
77
78	if ((ret = __crdel_inmem_create_read(env, dbtp->data, &argp)) != 0)
79		return (ret);
80	(void)printf(
81    "[%lu][%lu]__crdel_inmem_create%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
82	    (u_long)lsnp->file, (u_long)lsnp->offset,
83	    (argp->type & DB_debug_FLAG) ? "_debug" : "",
84	    (u_long)argp->type,
85	    (u_long)argp->txnp->txnid,
86	    (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
87	(void)printf("\tfileid: %ld\n", (long)argp->fileid);
88	(void)printf("\tname: ");
89	for (i = 0; i < argp->name.size; i++) {
90		ch = ((u_int8_t *)argp->name.data)[i];
91		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
92	}
93	(void)printf("\n");
94	(void)printf("\tfid: ");
95	for (i = 0; i < argp->fid.size; i++) {
96		ch = ((u_int8_t *)argp->fid.data)[i];
97		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
98	}
99	(void)printf("\n");
100	(void)printf("\tpgsize: %lu\n", (u_long)argp->pgsize);
101	(void)printf("\n");
102	__os_free(env, argp);
103	return (0);
104}
105
106/*
107 * PUBLIC: int __crdel_inmem_rename_print __P((ENV *, DBT *,
108 * PUBLIC:     DB_LSN *, db_recops, void *));
109 */
110int
111__crdel_inmem_rename_print(env, dbtp, lsnp, notused2, notused3)
112	ENV *env;
113	DBT *dbtp;
114	DB_LSN *lsnp;
115	db_recops notused2;
116	void *notused3;
117{
118	__crdel_inmem_rename_args *argp;
119	u_int32_t i;
120	int ch;
121	int ret;
122
123	notused2 = DB_TXN_PRINT;
124	notused3 = NULL;
125
126	if ((ret = __crdel_inmem_rename_read(env, dbtp->data, &argp)) != 0)
127		return (ret);
128	(void)printf(
129    "[%lu][%lu]__crdel_inmem_rename%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
130	    (u_long)lsnp->file, (u_long)lsnp->offset,
131	    (argp->type & DB_debug_FLAG) ? "_debug" : "",
132	    (u_long)argp->type,
133	    (u_long)argp->txnp->txnid,
134	    (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
135	(void)printf("\toldname: ");
136	for (i = 0; i < argp->oldname.size; i++) {
137		ch = ((u_int8_t *)argp->oldname.data)[i];
138		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
139	}
140	(void)printf("\n");
141	(void)printf("\tnewname: ");
142	for (i = 0; i < argp->newname.size; i++) {
143		ch = ((u_int8_t *)argp->newname.data)[i];
144		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
145	}
146	(void)printf("\n");
147	(void)printf("\tfid: ");
148	for (i = 0; i < argp->fid.size; i++) {
149		ch = ((u_int8_t *)argp->fid.data)[i];
150		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
151	}
152	(void)printf("\n");
153	(void)printf("\n");
154	__os_free(env, argp);
155	return (0);
156}
157
158/*
159 * PUBLIC: int __crdel_inmem_remove_print __P((ENV *, DBT *,
160 * PUBLIC:     DB_LSN *, db_recops, void *));
161 */
162int
163__crdel_inmem_remove_print(env, dbtp, lsnp, notused2, notused3)
164	ENV *env;
165	DBT *dbtp;
166	DB_LSN *lsnp;
167	db_recops notused2;
168	void *notused3;
169{
170	__crdel_inmem_remove_args *argp;
171	u_int32_t i;
172	int ch;
173	int ret;
174
175	notused2 = DB_TXN_PRINT;
176	notused3 = NULL;
177
178	if ((ret = __crdel_inmem_remove_read(env, dbtp->data, &argp)) != 0)
179		return (ret);
180	(void)printf(
181    "[%lu][%lu]__crdel_inmem_remove%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
182	    (u_long)lsnp->file, (u_long)lsnp->offset,
183	    (argp->type & DB_debug_FLAG) ? "_debug" : "",
184	    (u_long)argp->type,
185	    (u_long)argp->txnp->txnid,
186	    (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
187	(void)printf("\tname: ");
188	for (i = 0; i < argp->name.size; i++) {
189		ch = ((u_int8_t *)argp->name.data)[i];
190		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
191	}
192	(void)printf("\n");
193	(void)printf("\tfid: ");
194	for (i = 0; i < argp->fid.size; i++) {
195		ch = ((u_int8_t *)argp->fid.data)[i];
196		printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
197	}
198	(void)printf("\n");
199	(void)printf("\n");
200	__os_free(env, argp);
201	return (0);
202}
203
204/*
205 * PUBLIC: int __crdel_init_print __P((ENV *, DB_DISTAB *));
206 */
207int
208__crdel_init_print(env, dtabp)
209	ENV *env;
210	DB_DISTAB *dtabp;
211{
212	int ret;
213
214	if ((ret = __db_add_recovery_int(env, dtabp,
215	    __crdel_metasub_print, DB___crdel_metasub)) != 0)
216		return (ret);
217	if ((ret = __db_add_recovery_int(env, dtabp,
218	    __crdel_inmem_create_print, DB___crdel_inmem_create)) != 0)
219		return (ret);
220	if ((ret = __db_add_recovery_int(env, dtabp,
221	    __crdel_inmem_rename_print, DB___crdel_inmem_rename)) != 0)
222		return (ret);
223	if ((ret = __db_add_recovery_int(env, dtabp,
224	    __crdel_inmem_remove_print, DB___crdel_inmem_remove)) != 0)
225		return (ret);
226	return (0);
227}
228