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

qam_autop.c

00001 /* Do not edit: automatically built by gen_rec.awk. */
00002 
00003 #include "db_config.h"
00004 
00005 #ifdef HAVE_QUEUE
00006 #ifndef NO_SYSTEM_INCLUDES
00007 #include <sys/types.h>
00008 
00009 #include <ctype.h>
00010 #include <string.h>
00011 #endif
00012 
00013 #include "db_int.h"
00014 #include "dbinc/crypto.h"
00015 #include "dbinc/db_page.h"
00016 #include "dbinc/db_dispatch.h"
00017 #include "dbinc/db_am.h"
00018 #include "dbinc/log.h"
00019 #include "dbinc/qam.h"
00020 #include "dbinc/txn.h"
00021 
00022 /*
00023  * PUBLIC: int __qam_incfirst_print __P((DB_ENV *, DBT *, DB_LSN *,
00024  * PUBLIC:     db_recops, void *));
00025  */
00026 int
00027 __qam_incfirst_print(dbenv, dbtp, lsnp, notused2, notused3)
00028         DB_ENV *dbenv;
00029         DBT *dbtp;
00030         DB_LSN *lsnp;
00031         db_recops notused2;
00032         void *notused3;
00033 {
00034         __qam_incfirst_args *argp;
00035         int ret;
00036 
00037         notused2 = DB_TXN_PRINT;
00038         notused3 = NULL;
00039 
00040         if ((ret = __qam_incfirst_read(dbenv, dbtp->data, &argp)) != 0)
00041                 return (ret);
00042         (void)printf(
00043             "[%lu][%lu]__qam_incfirst%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("\trecno: %lu\n", (u_long)argp->recno);
00053         (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00054         (void)printf("\n");
00055         __os_free(dbenv, argp);
00056         return (0);
00057 }
00058 
00059 /*
00060  * PUBLIC: int __qam_mvptr_print __P((DB_ENV *, DBT *, DB_LSN *,
00061  * PUBLIC:     db_recops, void *));
00062  */
00063 int
00064 __qam_mvptr_print(dbenv, dbtp, lsnp, notused2, notused3)
00065         DB_ENV *dbenv;
00066         DBT *dbtp;
00067         DB_LSN *lsnp;
00068         db_recops notused2;
00069         void *notused3;
00070 {
00071         __qam_mvptr_args *argp;
00072         int ret;
00073 
00074         notused2 = DB_TXN_PRINT;
00075         notused3 = NULL;
00076 
00077         if ((ret = __qam_mvptr_read(dbenv, dbtp->data, &argp)) != 0)
00078                 return (ret);
00079         (void)printf(
00080             "[%lu][%lu]__qam_mvptr%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00081             (u_long)lsnp->file,
00082             (u_long)lsnp->offset,
00083             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00084             (u_long)argp->type,
00085             (u_long)argp->txnid->txnid,
00086             (u_long)argp->prev_lsn.file,
00087             (u_long)argp->prev_lsn.offset);
00088         (void)printf("\topcode: %lu\n", (u_long)argp->opcode);
00089         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00090         (void)printf("\told_first: %lu\n", (u_long)argp->old_first);
00091         (void)printf("\tnew_first: %lu\n", (u_long)argp->new_first);
00092         (void)printf("\told_cur: %lu\n", (u_long)argp->old_cur);
00093         (void)printf("\tnew_cur: %lu\n", (u_long)argp->new_cur);
00094         (void)printf("\tmetalsn: [%lu][%lu]\n",
00095             (u_long)argp->metalsn.file, (u_long)argp->metalsn.offset);
00096         (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
00097         (void)printf("\n");
00098         __os_free(dbenv, argp);
00099         return (0);
00100 }
00101 
00102 /*
00103  * PUBLIC: int __qam_del_print __P((DB_ENV *, DBT *, DB_LSN *,
00104  * PUBLIC:     db_recops, void *));
00105  */
00106 int
00107 __qam_del_print(dbenv, dbtp, lsnp, notused2, notused3)
00108         DB_ENV *dbenv;
00109         DBT *dbtp;
00110         DB_LSN *lsnp;
00111         db_recops notused2;
00112         void *notused3;
00113 {
00114         __qam_del_args *argp;
00115         int ret;
00116 
00117         notused2 = DB_TXN_PRINT;
00118         notused3 = NULL;
00119 
00120         if ((ret = __qam_del_read(dbenv, dbtp->data, &argp)) != 0)
00121                 return (ret);
00122         (void)printf(
00123             "[%lu][%lu]__qam_del%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00124             (u_long)lsnp->file,
00125             (u_long)lsnp->offset,
00126             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00127             (u_long)argp->type,
00128             (u_long)argp->txnid->txnid,
00129             (u_long)argp->prev_lsn.file,
00130             (u_long)argp->prev_lsn.offset);
00131         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00132         (void)printf("\tlsn: [%lu][%lu]\n",
00133             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00134         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00135         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00136         (void)printf("\trecno: %lu\n", (u_long)argp->recno);
00137         (void)printf("\n");
00138         __os_free(dbenv, argp);
00139         return (0);
00140 }
00141 
00142 /*
00143  * PUBLIC: int __qam_add_print __P((DB_ENV *, DBT *, DB_LSN *,
00144  * PUBLIC:     db_recops, void *));
00145  */
00146 int
00147 __qam_add_print(dbenv, dbtp, lsnp, notused2, notused3)
00148         DB_ENV *dbenv;
00149         DBT *dbtp;
00150         DB_LSN *lsnp;
00151         db_recops notused2;
00152         void *notused3;
00153 {
00154         __qam_add_args *argp;
00155         u_int32_t i;
00156         int ch;
00157         int ret;
00158 
00159         notused2 = DB_TXN_PRINT;
00160         notused3 = NULL;
00161 
00162         if ((ret = __qam_add_read(dbenv, dbtp->data, &argp)) != 0)
00163                 return (ret);
00164         (void)printf(
00165             "[%lu][%lu]__qam_add%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00166             (u_long)lsnp->file,
00167             (u_long)lsnp->offset,
00168             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00169             (u_long)argp->type,
00170             (u_long)argp->txnid->txnid,
00171             (u_long)argp->prev_lsn.file,
00172             (u_long)argp->prev_lsn.offset);
00173         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00174         (void)printf("\tlsn: [%lu][%lu]\n",
00175             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00176         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00177         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00178         (void)printf("\trecno: %lu\n", (u_long)argp->recno);
00179         (void)printf("\tdata: ");
00180         for (i = 0; i < argp->data.size; i++) {
00181                 ch = ((u_int8_t *)argp->data.data)[i];
00182                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00183         }
00184         (void)printf("\n");
00185         (void)printf("\tvflag: %lu\n", (u_long)argp->vflag);
00186         (void)printf("\tolddata: ");
00187         for (i = 0; i < argp->olddata.size; i++) {
00188                 ch = ((u_int8_t *)argp->olddata.data)[i];
00189                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00190         }
00191         (void)printf("\n");
00192         (void)printf("\n");
00193         __os_free(dbenv, argp);
00194         return (0);
00195 }
00196 
00197 /*
00198  * PUBLIC: int __qam_delext_print __P((DB_ENV *, DBT *, DB_LSN *,
00199  * PUBLIC:     db_recops, void *));
00200  */
00201 int
00202 __qam_delext_print(dbenv, dbtp, lsnp, notused2, notused3)
00203         DB_ENV *dbenv;
00204         DBT *dbtp;
00205         DB_LSN *lsnp;
00206         db_recops notused2;
00207         void *notused3;
00208 {
00209         __qam_delext_args *argp;
00210         u_int32_t i;
00211         int ch;
00212         int ret;
00213 
00214         notused2 = DB_TXN_PRINT;
00215         notused3 = NULL;
00216 
00217         if ((ret = __qam_delext_read(dbenv, dbtp->data, &argp)) != 0)
00218                 return (ret);
00219         (void)printf(
00220             "[%lu][%lu]__qam_delext%s: rec: %lu txnid %lx prevlsn [%lu][%lu]\n",
00221             (u_long)lsnp->file,
00222             (u_long)lsnp->offset,
00223             (argp->type & DB_debug_FLAG) ? "_debug" : "",
00224             (u_long)argp->type,
00225             (u_long)argp->txnid->txnid,
00226             (u_long)argp->prev_lsn.file,
00227             (u_long)argp->prev_lsn.offset);
00228         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
00229         (void)printf("\tlsn: [%lu][%lu]\n",
00230             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
00231         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
00232         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
00233         (void)printf("\trecno: %lu\n", (u_long)argp->recno);
00234         (void)printf("\tdata: ");
00235         for (i = 0; i < argp->data.size; i++) {
00236                 ch = ((u_int8_t *)argp->data.data)[i];
00237                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
00238         }
00239         (void)printf("\n");
00240         (void)printf("\n");
00241         __os_free(dbenv, argp);
00242         return (0);
00243 }
00244 
00245 /*
00246  * PUBLIC: int __qam_init_print __P((DB_ENV *, int (***)(DB_ENV *,
00247  * PUBLIC:     DBT *, DB_LSN *, db_recops, void *), size_t *));
00248  */
00249 int
00250 __qam_init_print(dbenv, dtabp, dtabsizep)
00251         DB_ENV *dbenv;
00252         int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00253         size_t *dtabsizep;
00254 {
00255         int ret;
00256 
00257         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00258             __qam_incfirst_print, DB___qam_incfirst)) != 0)
00259                 return (ret);
00260         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00261             __qam_mvptr_print, DB___qam_mvptr)) != 0)
00262                 return (ret);
00263         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00264             __qam_del_print, DB___qam_del)) != 0)
00265                 return (ret);
00266         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00267             __qam_add_print, DB___qam_add)) != 0)
00268                 return (ret);
00269         if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep,
00270             __qam_delext_print, DB___qam_delext)) != 0)
00271                 return (ret);
00272         return (0);
00273 }
00274 #endif /* HAVE_QUEUE */

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