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

db_vrfy_stub.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: db_vrfy_stub.c,v 12.1 2005/06/16 20:21:15 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #ifndef HAVE_VERIFY
00013 #ifndef NO_SYSTEM_INCLUDES
00014 #include <sys/types.h>
00015 #endif
00016 
00017 #include "db_int.h"
00018 #include "dbinc/db_page.h"
00019 #include "dbinc/db_am.h"
00020 #include "dbinc/db_verify.h"
00021 
00022 /*
00023  * If the library wasn't compiled with the verification support, various
00024  * routines aren't available.  Stub them here, returning an appropriate
00025  * error.
00026  */
00027 
00028 static int __db_novrfy __P((DB_ENV *));
00029 
00030 /*
00031  * __db_novrfy --
00032  *      Error when a Berkeley DB build doesn't include the access method.
00033  */
00034 static int
00035 __db_novrfy(dbenv)
00036         DB_ENV *dbenv;
00037 {
00038         __db_err(dbenv,
00039             "library build did not include support for database verification");
00040         return (DB_OPNOTSUP);
00041 }
00042 
00043 int
00044 __db_verify_pp(dbp, file, database, outfile, flags)
00045         DB *dbp;
00046         const char *file, *database;
00047         FILE *outfile;
00048         u_int32_t flags;
00049 {
00050         int ret;
00051 
00052         COMPQUIET(file, NULL);
00053         COMPQUIET(database, NULL);
00054         COMPQUIET(outfile, NULL);
00055         COMPQUIET(flags, 0);
00056 
00057         ret = __db_novrfy(dbp->dbenv);
00058 
00059         /* The verify method is a destructor. */
00060         (void)__db_close(dbp, NULL, 0);
00061 
00062         return (ret);
00063 }
00064 
00065 int
00066 __db_verify_internal(dbp, name, subdb, handle, callback, flags)
00067         DB *dbp;
00068         const char *name, *subdb;
00069         void *handle;
00070         int (*callback) __P((void *, const void *));
00071         u_int32_t flags;
00072 {
00073         COMPQUIET(dbp, NULL);
00074         COMPQUIET(name, NULL);
00075         COMPQUIET(subdb, NULL);
00076         COMPQUIET(handle, NULL);
00077         COMPQUIET(callback, NULL);
00078         COMPQUIET(flags, 0);
00079         return (0);
00080 }
00081 
00082 int
00083 __db_vrfy_getpageinfo(vdp, pgno, pipp)
00084         VRFY_DBINFO *vdp;
00085         db_pgno_t pgno;
00086         VRFY_PAGEINFO **pipp;
00087 {
00088         COMPQUIET(pgno, 0);
00089         COMPQUIET(pipp, NULL);
00090         return (__db_novrfy(vdp->pgdbp->dbenv));
00091 }
00092 
00093 int
00094 __db_vrfy_putpageinfo(dbenv, vdp, pip)
00095         DB_ENV *dbenv;
00096         VRFY_DBINFO *vdp;
00097         VRFY_PAGEINFO *pip;
00098 {
00099         COMPQUIET(vdp, NULL);
00100         COMPQUIET(pip, NULL);
00101         return (__db_novrfy(dbenv));
00102 }
00103 #endif /* !HAVE_VERIFY */

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