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_am.h" 9#include "dbinc/log.h" 10#include "dbinc/txn.h" 11#include "dbinc/fop.h" 12 13/* 14 * PUBLIC: int __fop_create_print __P((ENV *, DBT *, DB_LSN *, 15 * PUBLIC: db_recops, void *)); 16 */ 17int 18__fop_create_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 __fop_create_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 = __fop_create_read(env, dbtp->data, &argp)) != 0) 34 return (ret); 35 (void)printf( 36 "[%lu][%lu]__fop_create%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("\tname: "); 43 for (i = 0; i < argp->name.size; i++) { 44 ch = ((u_int8_t *)argp->name.data)[i]; 45 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 46 } 47 (void)printf("\n"); 48 (void)printf("\tappname: %lu\n", (u_long)argp->appname); 49 (void)printf("\tmode: %o\n", argp->mode); 50 (void)printf("\n"); 51 __os_free(env, argp); 52 return (0); 53} 54 55/* 56 * PUBLIC: int __fop_remove_print __P((ENV *, DBT *, DB_LSN *, 57 * PUBLIC: db_recops, void *)); 58 */ 59int 60__fop_remove_print(env, dbtp, lsnp, notused2, notused3) 61 ENV *env; 62 DBT *dbtp; 63 DB_LSN *lsnp; 64 db_recops notused2; 65 void *notused3; 66{ 67 __fop_remove_args *argp; 68 u_int32_t i; 69 int ch; 70 int ret; 71 72 notused2 = DB_TXN_PRINT; 73 notused3 = NULL; 74 75 if ((ret = __fop_remove_read(env, dbtp->data, &argp)) != 0) 76 return (ret); 77 (void)printf( 78 "[%lu][%lu]__fop_remove%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 79 (u_long)lsnp->file, (u_long)lsnp->offset, 80 (argp->type & DB_debug_FLAG) ? "_debug" : "", 81 (u_long)argp->type, 82 (u_long)argp->txnp->txnid, 83 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 84 (void)printf("\tname: "); 85 for (i = 0; i < argp->name.size; i++) { 86 ch = ((u_int8_t *)argp->name.data)[i]; 87 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 88 } 89 (void)printf("\n"); 90 (void)printf("\tfid: "); 91 for (i = 0; i < argp->fid.size; i++) { 92 ch = ((u_int8_t *)argp->fid.data)[i]; 93 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 94 } 95 (void)printf("\n"); 96 (void)printf("\tappname: %lu\n", (u_long)argp->appname); 97 (void)printf("\n"); 98 __os_free(env, argp); 99 return (0); 100} 101 102/* 103 * PUBLIC: int __fop_write_print __P((ENV *, DBT *, DB_LSN *, 104 * PUBLIC: db_recops, void *)); 105 */ 106int 107__fop_write_print(env, dbtp, lsnp, notused2, notused3) 108 ENV *env; 109 DBT *dbtp; 110 DB_LSN *lsnp; 111 db_recops notused2; 112 void *notused3; 113{ 114 __fop_write_args *argp; 115 u_int32_t i; 116 int ch; 117 int ret; 118 119 notused2 = DB_TXN_PRINT; 120 notused3 = NULL; 121 122 if ((ret = __fop_write_read(env, dbtp->data, &argp)) != 0) 123 return (ret); 124 (void)printf( 125 "[%lu][%lu]__fop_write%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 126 (u_long)lsnp->file, (u_long)lsnp->offset, 127 (argp->type & DB_debug_FLAG) ? "_debug" : "", 128 (u_long)argp->type, 129 (u_long)argp->txnp->txnid, 130 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 131 (void)printf("\tname: "); 132 for (i = 0; i < argp->name.size; i++) { 133 ch = ((u_int8_t *)argp->name.data)[i]; 134 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 135 } 136 (void)printf("\n"); 137 (void)printf("\tappname: %lu\n", (u_long)argp->appname); 138 (void)printf("\tpgsize: %lu\n", (u_long)argp->pgsize); 139 (void)printf("\tpageno: %lu\n", (u_long)argp->pageno); 140 (void)printf("\toffset: %lu\n", (u_long)argp->offset); 141 (void)printf("\tpage: "); 142 for (i = 0; i < argp->page.size; i++) { 143 ch = ((u_int8_t *)argp->page.data)[i]; 144 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 145 } 146 (void)printf("\n"); 147 (void)printf("\tflag: %lu\n", (u_long)argp->flag); 148 (void)printf("\n"); 149 __os_free(env, argp); 150 return (0); 151} 152 153/* 154 * PUBLIC: int __fop_rename_print __P((ENV *, DBT *, DB_LSN *, 155 * PUBLIC: db_recops, void *)); 156 */ 157int 158__fop_rename_print(env, dbtp, lsnp, notused2, notused3) 159 ENV *env; 160 DBT *dbtp; 161 DB_LSN *lsnp; 162 db_recops notused2; 163 void *notused3; 164{ 165 __fop_rename_args *argp; 166 u_int32_t i; 167 int ch; 168 int ret; 169 170 notused2 = DB_TXN_PRINT; 171 notused3 = NULL; 172 173 if ((ret = __fop_rename_read(env, dbtp->data, &argp)) != 0) 174 return (ret); 175 (void)printf( 176 "[%lu][%lu]__fop_rename%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 177 (u_long)lsnp->file, (u_long)lsnp->offset, 178 (argp->type & DB_debug_FLAG) ? "_debug" : "", 179 (u_long)argp->type, 180 (u_long)argp->txnp->txnid, 181 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 182 (void)printf("\toldname: "); 183 for (i = 0; i < argp->oldname.size; i++) { 184 ch = ((u_int8_t *)argp->oldname.data)[i]; 185 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 186 } 187 (void)printf("\n"); 188 (void)printf("\tnewname: "); 189 for (i = 0; i < argp->newname.size; i++) { 190 ch = ((u_int8_t *)argp->newname.data)[i]; 191 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 192 } 193 (void)printf("\n"); 194 (void)printf("\tfileid: "); 195 for (i = 0; i < argp->fileid.size; i++) { 196 ch = ((u_int8_t *)argp->fileid.data)[i]; 197 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 198 } 199 (void)printf("\n"); 200 (void)printf("\tappname: %lu\n", (u_long)argp->appname); 201 (void)printf("\n"); 202 __os_free(env, argp); 203 return (0); 204} 205 206/* 207 * PUBLIC: int __fop_file_remove_print __P((ENV *, DBT *, DB_LSN *, 208 * PUBLIC: db_recops, void *)); 209 */ 210int 211__fop_file_remove_print(env, dbtp, lsnp, notused2, notused3) 212 ENV *env; 213 DBT *dbtp; 214 DB_LSN *lsnp; 215 db_recops notused2; 216 void *notused3; 217{ 218 __fop_file_remove_args *argp; 219 u_int32_t i; 220 int ch; 221 int ret; 222 223 notused2 = DB_TXN_PRINT; 224 notused3 = NULL; 225 226 if ((ret = __fop_file_remove_read(env, dbtp->data, &argp)) != 0) 227 return (ret); 228 (void)printf( 229 "[%lu][%lu]__fop_file_remove%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n", 230 (u_long)lsnp->file, (u_long)lsnp->offset, 231 (argp->type & DB_debug_FLAG) ? "_debug" : "", 232 (u_long)argp->type, 233 (u_long)argp->txnp->txnid, 234 (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); 235 (void)printf("\treal_fid: "); 236 for (i = 0; i < argp->real_fid.size; i++) { 237 ch = ((u_int8_t *)argp->real_fid.data)[i]; 238 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 239 } 240 (void)printf("\n"); 241 (void)printf("\ttmp_fid: "); 242 for (i = 0; i < argp->tmp_fid.size; i++) { 243 ch = ((u_int8_t *)argp->tmp_fid.data)[i]; 244 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 245 } 246 (void)printf("\n"); 247 (void)printf("\tname: "); 248 for (i = 0; i < argp->name.size; i++) { 249 ch = ((u_int8_t *)argp->name.data)[i]; 250 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch); 251 } 252 (void)printf("\n"); 253 (void)printf("\tappname: %lu\n", (u_long)argp->appname); 254 (void)printf("\tchild: 0x%lx\n", (u_long)argp->child); 255 (void)printf("\n"); 256 __os_free(env, argp); 257 return (0); 258} 259 260/* 261 * PUBLIC: int __fop_init_print __P((ENV *, DB_DISTAB *)); 262 */ 263int 264__fop_init_print(env, dtabp) 265 ENV *env; 266 DB_DISTAB *dtabp; 267{ 268 int ret; 269 270 if ((ret = __db_add_recovery_int(env, dtabp, 271 __fop_create_print, DB___fop_create)) != 0) 272 return (ret); 273 if ((ret = __db_add_recovery_int(env, dtabp, 274 __fop_remove_print, DB___fop_remove)) != 0) 275 return (ret); 276 if ((ret = __db_add_recovery_int(env, dtabp, 277 __fop_write_print, DB___fop_write)) != 0) 278 return (ret); 279 if ((ret = __db_add_recovery_int(env, dtabp, 280 __fop_rename_print, DB___fop_rename)) != 0) 281 return (ret); 282 if ((ret = __db_add_recovery_int(env, dtabp, 283 __fop_rename_print, DB___fop_rename_noundo)) != 0) 284 return (ret); 285 if ((ret = __db_add_recovery_int(env, dtabp, 286 __fop_file_remove_print, DB___fop_file_remove)) != 0) 287 return (ret); 288 return (0); 289} 290