1/*-
2 * See the file LICENSE for redistribution information.
3 *
4 * Copyright (c) 1996,2008 Oracle.  All rights reserved.
5 *
6 * $Id: db_vrfy_stub.c,v 12.9 2008/01/08 20:58:10 bostic Exp $
7 */
8
9#ifndef HAVE_VERIFY
10#include "db_config.h"
11
12#include "db_int.h"
13#include "dbinc/db_page.h"
14#include "dbinc/db_am.h"
15#include "dbinc/db_verify.h"
16
17/*
18 * If the library wasn't compiled with the verification support, various
19 * routines aren't available.  Stub them here, returning an appropriate
20 * error.
21 */
22
23static int __db_novrfy __P((ENV *));
24
25/*
26 * __db_novrfy --
27 *	Error when a Berkeley DB build doesn't include the access method.
28 */
29static int
30__db_novrfy(env)
31	ENV *env;
32{
33	__db_errx(env,
34	    "library build did not include support for database verification");
35	return (DB_OPNOTSUP);
36}
37
38int
39__db_verify_pp(dbp, file, database, outfile, flags)
40	DB *dbp;
41	const char *file, *database;
42	FILE *outfile;
43	u_int32_t flags;
44{
45	int ret;
46
47	COMPQUIET(file, NULL);
48	COMPQUIET(database, NULL);
49	COMPQUIET(outfile, NULL);
50	COMPQUIET(flags, 0);
51
52	ret = __db_novrfy(dbp->env);
53
54	/* The verify method is a destructor. */
55	(void)__db_close(dbp, NULL, 0);
56
57	return (ret);
58}
59
60int
61__db_verify_internal(dbp, name, subdb, handle, callback, flags)
62	DB *dbp;
63	const char *name, *subdb;
64	void *handle;
65	int (*callback) __P((void *, const void *));
66	u_int32_t flags;
67{
68	COMPQUIET(dbp, NULL);
69	COMPQUIET(name, NULL);
70	COMPQUIET(subdb, NULL);
71	COMPQUIET(handle, NULL);
72	COMPQUIET(callback, NULL);
73	COMPQUIET(flags, 0);
74	return (0);
75}
76
77int
78__db_vrfy_getpageinfo(vdp, pgno, pipp)
79	VRFY_DBINFO *vdp;
80	db_pgno_t pgno;
81	VRFY_PAGEINFO **pipp;
82{
83	COMPQUIET(pgno, 0);
84	COMPQUIET(pipp, NULL);
85	return (__db_novrfy(vdp->pgdbp->env));
86}
87
88int
89__db_vrfy_putpageinfo(env, vdp, pip)
90	ENV *env;
91	VRFY_DBINFO *vdp;
92	VRFY_PAGEINFO *pip;
93{
94	COMPQUIET(vdp, NULL);
95	COMPQUIET(pip, NULL);
96	return (__db_novrfy(env));
97}
98#endif /* !HAVE_VERIFY */
99