Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

crdel_autop.c

00001 /* Do not edit: automatically built by gen_rec.awk. */
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  * PUBLIC: int __crdel_metasub_print __P((DB_ENV *, DBT *, DB_LSN *,
00022  * PUBLIC:     db_recops, void *));
00023  */
00024 int
00025 __crdel_metasub_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         __crdel_metasub_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 = __crdel_metasub_read(dbenv, dbtp->data, &argp)) != 0)
00041                 return (ret);
00042         (void)printf(
00043             "[%lu][%lu]__crdel_metasub%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("\tfileid: %ld\n", (long)argp->fileid);
00052         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00053         (void)printf("\tpage: ");
00054         for (i = 0; i < argp->page.size; i++) {
00055                 ch = ((u_int8_t *)argp->page.data)[i];
00056                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00057         }
00058         (void)printf("\n");
00059         (void)printf("\tlsn: [%lu][%lu]\n",
00060             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00061         (void)printf("\n");
00062         __os_free(dbenv, argp);
00063         return (0);
00064 }
00065 
00066 /*
00067  * PUBLIC: int __crdel_inmem_create_print __P((DB_ENV *, DBT *,
00068  * PUBLIC:     DB_LSN *, db_recops, void *));
00069  */
00070 int
00071 __crdel_inmem_create_print(dbenv, dbtp, lsnp, notused2, notused3)
00072         DB_ENV *dbenv;
00073         DBT *dbtp;
00074         DB_LSN *lsnp;
00075         db_recops notused2;
00076         void *notused3;
00077 {
00078         __crdel_inmem_create_args *argp;
00079         u_int32_t i;
00080         int ch;
00081         int ret;
00082 
00083         notused2 = DB_TXN_PRINT;
00084         notused3 = NULL;
00085 
00086         if ((ret = __crdel_inmem_create_read(dbenv, dbtp->data, &argp)) != 0)
00087                 return (ret);
00088         (void)printf(
00089             "[%lu][%lu]__crdel_inmem_create%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00090             (u_long)lsnp->file,
00091             (u_long)lsnp->offset,
00092             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00093             (u_long)argp->type,
00094             (u_long)argp->txnid->txnid,
00095             (u_long)argp->prev_lsn.file,
00096             (u_long)argp->prev_lsn.offset);
00097         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00098         (void)printf("\tname: ");
00099         for (i = 0; i < argp->name.size; i++) {
00100                 ch = ((u_int8_t *)argp->name.data)[i];
00101                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00102         }
00103         (void)printf("\n");
00104         (void)printf("\tfid: ");
00105         for (i = 0; i < argp->fid.size; i++) {
00106                 ch = ((u_int8_t *)argp->fid.data)[i];
00107                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00108         }
00109         (void)printf("\n");
00110         (void)printf("\tpgsize: %lu\n", (u_long)argp->pgsize);
00111         (void)printf("\n");
00112         __os_free(dbenv, argp);
00113         return (0);
00114 }
00115 
00116 /*
00117  * PUBLIC: int __crdel_inmem_rename_print __P((DB_ENV *, DBT *,
00118  * PUBLIC:     DB_LSN *, db_recops, void *));
00119  */
00120 int
00121 __crdel_inmem_rename_print(dbenv, dbtp, lsnp, notused2, notused3)
00122         DB_ENV *dbenv;
00123         DBT *dbtp;
00124         DB_LSN *lsnp;
00125         db_recops notused2;
00126         void *notused3;
00127 {
00128         __crdel_inmem_rename_args *argp;
00129         u_int32_t i;
00130         int ch;
00131         int ret;
00132 
00133         notused2 = DB_TXN_PRINT;
00134         notused3 = NULL;
00135 
00136         if ((ret = __crdel_inmem_rename_read(dbenv, dbtp->data, &argp)) != 0)
00137                 return (ret);
00138         (void)printf(
00139             "[%lu][%lu]__crdel_inmem_rename%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00140             (u_long)lsnp->file,
00141             (u_long)lsnp->offset,
00142             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00143             (u_long)argp->type,
00144             (u_long)argp->txnid->txnid,
00145             (u_long)argp->prev_lsn.file,
00146             (u_long)argp->prev_lsn.offset);
00147         (void)printf("\toldname: ");
00148         for (i = 0; i < argp->oldname.size; i++) {
00149                 ch = ((u_int8_t *)argp->oldname.data)[i];
00150                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00151         }
00152         (void)printf("\n");
00153         (void)printf("\tnewname: ");
00154         for (i = 0; i < argp->newname.size; i++) {
00155                 ch = ((u_int8_t *)argp->newname.data)[i];
00156                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00157         }
00158         (void)printf("\n");
00159         (void)printf("\tfid: ");
00160         for (i = 0; i < argp->fid.size; i++) {
00161                 ch = ((u_int8_t *)argp->fid.data)[i];
00162                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00163         }
00164         (void)printf("\n");
00165         (void)printf("\n");
00166         __os_free(dbenv, argp);
00167         return (0);
00168 }
00169 
00170 /*
00171  * PUBLIC: int __crdel_inmem_remove_print __P((DB_ENV *, DBT *,
00172  * PUBLIC:     DB_LSN *, db_recops, void *));
00173  */
00174 int
00175 __crdel_inmem_remove_print(dbenv, dbtp, lsnp, notused2, notused3)
00176         DB_ENV *dbenv;
00177         DBT *dbtp;
00178         DB_LSN *lsnp;
00179         db_recops notused2;
00180         void *notused3;
00181 {
00182         __crdel_inmem_remove_args *argp;
00183         u_int32_t i;
00184         int ch;
00185         int ret;
00186 
00187         notused2 = DB_TXN_PRINT;
00188         notused3 = NULL;
00189 
00190         if ((ret = __crdel_inmem_remove_read(dbenv, dbtp->data, &argp)) != 0)
00191                 return (ret);
00192         (void)printf(
00193             "[%lu][%lu]__crdel_inmem_remove%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00194             (u_long)lsnp->file,
00195             (u_long)lsnp->offset,
00196             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00197             (u_long)argp->type,
00198             (u_long)argp->txnid->txnid,
00199             (u_long)argp->prev_lsn.file,
00200             (u_long)argp->prev_lsn.offset);
00201         (void)printf("\tname: ");
00202         for (i = 0; i < argp->name.size; i++) {
00203                 ch = ((u_int8_t *)argp->name.data)[i];
00204                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00205         }
00206         (void)printf("\n");
00207         (void)printf("\tfid: ");
00208         for (i = 0; i < argp->fid.size; i++) {
00209                 ch = ((u_int8_t *)argp->fid.data)[i];
00210                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00211         }
00212         (void)printf("\n");
00213         (void)printf("\n");
00214         __os_free(dbenv, argp);
00215         return (0);
00216 }
00217 
00218 /*
00219  * PUBLIC: int __crdel_init_print __P((DB_ENV *, int (***)(DB_ENV *,
00220  * PUBLIC:     DBT *, DB_LSN *, db_recops, void *), size_t *));
00221  */
00222 int
00223 __crdel_init_print(dbenv, dtabp, dtabsizep)
00224         DB_ENV *dbenv;
00225         int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00226         size_t *dtabsizep;
00227 {
00228         int ret;
00229 
00230         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00231             __crdel_metasub_print, DB___crdel_metasub)) != 0)
00232                 return (ret);
00233         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00234             __crdel_inmem_create_print, DB___crdel_inmem_create)) != 0)
00235                 return (ret);
00236         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00237             __crdel_inmem_rename_print, DB___crdel_inmem_rename)) != 0)
00238                 return (ret);
00239         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00240             __crdel_inmem_remove_print, DB___crdel_inmem_remove)) != 0)
00241                 return (ret);
00242         return (0);
00243 }

Generated on Sun Dec 25 12:14:18 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2