Module Name:    src
Committed By:   christos
Date:           Sat Sep 24 21:31:25 UTC 2016

Modified Files:
        src/lib/libc/db/btree: bt_close.c bt_debug.c bt_delete.c bt_open.c
            bt_overflow.c bt_page.c bt_put.c bt_search.c bt_seq.c bt_split.c
        src/lib/libc/db/mpool: mpool.c
        src/lib/libc/db/recno: rec_open.c rec_search.c
        src/lib/libc/include: namespace.h

Log Message:
remove mpool_getf


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/db/btree/bt_close.c
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/db/btree/bt_debug.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/btree/bt_delete.c \
    src/lib/libc/db/btree/bt_search.c
cvs rdiff -u -r1.28 -r1.29 src/lib/libc/db/btree/bt_open.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/db/btree/bt_overflow.c \
    src/lib/libc/db/btree/bt_put.c src/lib/libc/db/btree/bt_split.c
cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/btree/bt_page.c
cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/btree/bt_seq.c
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/db/mpool/mpool.c
cvs rdiff -u -r1.21 -r1.22 src/lib/libc/db/recno/rec_open.c
cvs rdiff -u -r1.15 -r1.16 src/lib/libc/db/recno/rec_search.c
cvs rdiff -u -r1.181 -r1.182 src/lib/libc/include/namespace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/db/btree/bt_close.c
diff -u src/lib/libc/db/btree/bt_close.c:1.16 src/lib/libc/db/btree/bt_close.c:1.17
--- src/lib/libc/db/btree/bt_close.c:1.16	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_close.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_close.c,v 1.17 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_close.c,v 1.17 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 
@@ -164,7 +164,7 @@ bt_meta(BTREE *t)
 	BTMETA m;
 	void *p;
 
-	if ((p = mpool_getf(t->bt_mp, P_META, 0)) == NULL)
+	if ((p = mpool_get(t->bt_mp, P_META, 0)) == NULL)
 		return (RET_ERROR);
 
 	/* Fill in metadata. */

Index: src/lib/libc/db/btree/bt_debug.c
diff -u src/lib/libc/db/btree/bt_debug.c:1.17 src/lib/libc/db/btree/bt_debug.c:1.18
--- src/lib/libc/db/btree/bt_debug.c:1.17	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_debug.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_debug.c,v 1.17 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_debug.c,v 1.18 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_debug.c,v 1.17 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_debug.c,v 1.18 2016/09/24 21:31:25 christos Exp $");
 
 #include <assert.h>
 #include <stdio.h>
@@ -111,7 +111,7 @@ __bt_dump(DB *dbp)
 #undef X
 
 	for (i = P_ROOT; i < t->bt_mp->npages &&
-	    (h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i)
+	    (h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i)
 		__bt_dpage(h);
 
 	(void)fflush(tracefp);
@@ -183,7 +183,7 @@ __bt_dnpage(DB *dbp, pgno_t pgno)
 	__bt_dinit();
 
 	t = dbp->internal;
-	if ((h = mpool_getf(t->bt_mp, pgno, MPOOL_IGNOREPIN)) != NULL) {
+	if ((h = mpool_get(t->bt_mp, pgno, MPOOL_IGNOREPIN)) != NULL) {
 		__bt_dpage(h);
 		(void)mpool_put(t->bt_mp, h, 0);
 	}
@@ -312,7 +312,7 @@ __bt_stat(DB *dbp)
 	pcont = pinternal = pleaf = 0;
 	nkeys = ifree = lfree = 0;
 	for (i = P_ROOT; i < t->bt_mp->npages &&
-	    (h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i)
+	    (h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i)
 		switch (h->flags & P_TYPE) {
 		case P_BINTERNAL:
 		case P_RINTERNAL:
@@ -334,7 +334,7 @@ __bt_stat(DB *dbp)
 
 	/* Count the levels of the tree. */
 	for (i = P_ROOT, levels = 0 ;; ++levels) {
-		h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN);
+		h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN);
 		if (h->flags & (P_BLEAF|P_RLEAF)) {
 			if (levels == 0)
 				levels = 1;

Index: src/lib/libc/db/btree/bt_delete.c
diff -u src/lib/libc/db/btree/bt_delete.c:1.18 src/lib/libc/db/btree/bt_delete.c:1.19
--- src/lib/libc/db/btree/bt_delete.c:1.18	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_delete.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_delete.c,v 1.18 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_delete.c,v 1.19 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_delete.c,v 1.18 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_delete.c,v 1.19 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -96,7 +96,7 @@ __bt_delete(const DB *dbp, const DBT *ke
 		if (F_ISSET(c, CURS_INIT)) {
 			if (F_ISSET(c, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE))
 				return (RET_SPECIAL);
-			if ((h = mpool_getf(t->bt_mp, c->pg.pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
 				return (RET_ERROR);
 
 			/*
@@ -180,7 +180,7 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR 
 		/* Move up the stack. */
 		for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
 			/* Get the parent page. */
-			if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 				return (1);
 
 			/* Move to the next index. */
@@ -203,12 +203,12 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR 
 			mpool_put(t->bt_mp, h, 0);
 
 			/* Get the next level down. */
-			if ((h = mpool_getf(t->bt_mp, pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
 				return (1);
 			idx = 0;
 		}
 		mpool_put(t->bt_mp, h, 0);
-		if ((h = mpool_getf(t->bt_mp, nextpg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, nextpg, 0)) == NULL)
 			return (1);
 	}
 
@@ -235,7 +235,7 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR 
 		/* Move up the stack. */
 		for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
 			/* Get the parent page. */
-			if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 				return (1);
 
 			/* Move to the next index. */
@@ -257,20 +257,20 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR 
 			mpool_put(t->bt_mp, h, 0);
 
 			/* Get the next level down. */
-			if ((h = mpool_getf(t->bt_mp, pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
 				return (1);
 
 			idx = NEXTINDEX(h) - 1;
 			BT_PUSH(t, pgno, idx);
 		}
 		mpool_put(t->bt_mp, h, 0);
-		if ((h = mpool_getf(t->bt_mp, prevpg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, prevpg, 0)) == NULL)
 			return (1);
 	}
 	
 
 ret:	mpool_put(t->bt_mp, h, 0);
-	return ((*hp = mpool_getf(t->bt_mp, c->pg.pgno, 0)) == NULL);
+	return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL);
 }
 
 /*
@@ -393,7 +393,7 @@ __bt_pdelete(BTREE *t, PAGE *h)
 	 */
 	while ((parent = BT_POP(t)) != NULL) {
 		/* Get the parent page. */
-		if ((pg = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+		if ((pg = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 			return (RET_ERROR);
 		
 		idx = parent->index;
@@ -576,7 +576,7 @@ __bt_curdel(BTREE *t, const DBT *key, PA
 		}
 		/* Check previous key if at the beginning of the page. */
 		if (idx == 0 && h->prevpg != P_INVALID) {
-			if ((pg = mpool_getf(t->bt_mp, h->prevpg, 0)) == NULL)
+			if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
 				return (RET_ERROR);
 			e.page = pg;
 			e.index = NEXTINDEX(pg) - 1;
@@ -588,7 +588,7 @@ __bt_curdel(BTREE *t, const DBT *key, PA
 		}
 		/* Check next key if at the end of the page. */
 		if (idx == (unsigned)(NEXTINDEX(h) - 1) && h->nextpg != P_INVALID) {
-			if ((pg = mpool_getf(t->bt_mp, h->nextpg, 0)) == NULL)
+			if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
 				return (RET_ERROR);
 			e.page = pg;
 			e.index = 0;
@@ -626,13 +626,13 @@ __bt_relink(BTREE *t, PAGE *h)
 	PAGE *pg;
 
 	if (h->nextpg != P_INVALID) {
-		if ((pg = mpool_getf(t->bt_mp, h->nextpg, 0)) == NULL)
+		if ((pg = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
 			return (RET_ERROR);
 		pg->prevpg = h->prevpg;
 		mpool_put(t->bt_mp, pg, MPOOL_DIRTY);
 	}
 	if (h->prevpg != P_INVALID) {
-		if ((pg = mpool_getf(t->bt_mp, h->prevpg, 0)) == NULL)
+		if ((pg = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
 			return (RET_ERROR);
 		pg->nextpg = h->nextpg;
 		mpool_put(t->bt_mp, pg, MPOOL_DIRTY);
Index: src/lib/libc/db/btree/bt_search.c
diff -u src/lib/libc/db/btree/bt_search.c:1.18 src/lib/libc/db/btree/bt_search.c:1.19
--- src/lib/libc/db/btree/bt_search.c:1.18	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_search.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_search.c,v 1.18 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_search.c,v 1.19 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_search.c,v 1.18 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_search.c,v 1.19 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -75,7 +75,7 @@ __bt_search(BTREE *t, const DBT *key, in
 
 	BT_CLR(t);
 	for (pg = P_ROOT;;) {
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return (NULL);
 
 		/* Do a binary search on the current page. */
@@ -161,7 +161,7 @@ __bt_snext(BTREE *t, PAGE *h, const DBT 
 	 * Get the next page.  The key is either an exact
 	 * match, or not as good as the one we already have.
 	 */
-	if ((e.page = mpool_getf(t->bt_mp, h->nextpg, 0)) == NULL)
+	if ((e.page = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL)
 		return 0;
 	e.index = 0;
 	if (__bt_cmp(t, key, &e) != 0) {
@@ -179,7 +179,7 @@ __bt_snext(BTREE *t, PAGE *h, const DBT 
 	 */
 	for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
 		/* Get the parent page. */
-		if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 			return 0;
 
 		/* Move to the next index. */
@@ -203,7 +203,7 @@ __bt_snext(BTREE *t, PAGE *h, const DBT 
 		mpool_put(t->bt_mp, h, 0);
 
 		/* Get the next level down. */
-		if ((h = mpool_getf(t->bt_mp, pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
 			return 0;
 		idx = 0;
 	}
@@ -238,7 +238,7 @@ __bt_sprev(BTREE *t, PAGE *h, const DBT 
 	 * Get the previous page.  The key is either an exact
 	 * match, or not as good as the one we already have.
 	 */
-	if ((e.page = mpool_getf(t->bt_mp, h->prevpg, 0)) == NULL)
+	if ((e.page = mpool_get(t->bt_mp, h->prevpg, 0)) == NULL)
 		return 0;
 	e.index = NEXTINDEX(e.page) - 1;
 	if (__bt_cmp(t, key, &e) != 0) {
@@ -257,7 +257,7 @@ __bt_sprev(BTREE *t, PAGE *h, const DBT 
 	 */
 	for (level = 0; (parent = BT_POP(t)) != NULL; ++level) {
 		/* Get the parent page. */
-		if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 			return 1;
 
 		/* Move to the next index. */
@@ -279,7 +279,7 @@ __bt_sprev(BTREE *t, PAGE *h, const DBT 
 		mpool_put(t->bt_mp, h, 0);
 
 		/* Get the next level down. */
-		if ((h = mpool_getf(t->bt_mp, pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pgno, 0)) == NULL)
 			return 1;
 
 		idx = NEXTINDEX(h) - 1;

Index: src/lib/libc/db/btree/bt_open.c
diff -u src/lib/libc/db/btree/bt_open.c:1.28 src/lib/libc/db/btree/bt_open.c:1.29
--- src/lib/libc/db/btree/bt_open.c:1.28	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_open.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_open.c,v 1.28 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_open.c,v 1.29 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_open.c,v 1.28 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_open.c,v 1.29 2016/09/24 21:31:25 christos Exp $");
 
 /*
  * Implementation of btree access method for 4.4BSD.
@@ -354,7 +354,7 @@ nroot(BTREE *t)
 	PAGE *meta, *root;
 	pgno_t npg;
 
-	if ((root = mpool_getf(t->bt_mp, 1, 0)) != NULL) {
+	if ((root = mpool_get(t->bt_mp, 1, 0)) != NULL) {
 		if (root->lower == 0 &&
 		    root->pgno == 0 &&
 		    root->linp[0] == 0) {

Index: src/lib/libc/db/btree/bt_overflow.c
diff -u src/lib/libc/db/btree/bt_overflow.c:1.21 src/lib/libc/db/btree/bt_overflow.c:1.22
--- src/lib/libc/db/btree/bt_overflow.c:1.21	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_overflow.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_overflow.c,v 1.21 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_overflow.c,v 1.22 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_overflow.c,v 1.21 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_overflow.c,v 1.22 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/param.h>
@@ -112,7 +112,7 @@ __ovfl_get(BTREE *t, void *p, size_t *ss
 	_DBFIT(temp, uint32_t);
 	plen = (uint32_t)temp;
 	for (p = *buf;; p = (char *)p + nb, pg = h->nextpg) {
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return (RET_ERROR);
 
 		nb = MIN(sz, plen);
@@ -208,7 +208,7 @@ __ovfl_delete(BTREE *t, void *p)
 	if (pg == P_INVALID || sz == 0)
 		abort();
 #endif
-	if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+	if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 		return (RET_ERROR);
 
 	/* Don't delete chains used by internal pages. */
@@ -226,7 +226,7 @@ __ovfl_delete(BTREE *t, void *p)
 		__bt_free(t, h);
 		if (sz <= plen)
 			break;
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return (RET_ERROR);
 	}
 	return (RET_SUCCESS);
Index: src/lib/libc/db/btree/bt_put.c
diff -u src/lib/libc/db/btree/bt_put.c:1.21 src/lib/libc/db/btree/bt_put.c:1.22
--- src/lib/libc/db/btree/bt_put.c:1.21	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_put.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_put.c,v 1.21 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_put.c,v 1.22 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_put.c,v 1.21 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_put.c,v 1.22 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -152,7 +152,7 @@ storekey:		if (__ovfl_put(t, key, &pg) =
 
 	/* Replace the cursor. */
 	if (flags == R_CURSOR) {
-		if ((h = mpool_getf(t->bt_mp, t->bt_cursor.pg.pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, t->bt_cursor.pg.pgno, 0)) == NULL)
 			return (RET_ERROR);
 		idx = t->bt_cursor.pg.index;
 		goto delete;
@@ -271,7 +271,7 @@ bt_fast(BTREE *t, const DBT *key, const 
 	uint32_t nbytes;
 	int cmp;
 
-	if ((h = mpool_getf(t->bt_mp, t->bt_last.pgno, 0)) == NULL) {
+	if ((h = mpool_get(t->bt_mp, t->bt_last.pgno, 0)) == NULL) {
 		t->bt_order = NOT;
 		return (NULL);
 	}
Index: src/lib/libc/db/btree/bt_split.c
diff -u src/lib/libc/db/btree/bt_split.c:1.21 src/lib/libc/db/btree/bt_split.c:1.22
--- src/lib/libc/db/btree/bt_split.c:1.21	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_split.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_split.c,v 1.21 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_split.c,v 1.22 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_split.c,v 1.21 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_split.c,v 1.22 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -153,7 +153,7 @@ __bt_split(BTREE *t, PAGE *sp, const DBT
 		rchild = r;
 
 		/* Get the parent page. */
-		if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 			goto err2;
 
 	 	/*
@@ -401,7 +401,7 @@ bt_page(BTREE *t, PAGE *h, PAGE **lp, PA
 
 	/* Fix up the previous pointer of the page after the split page. */
 	if (h->nextpg != P_INVALID) {
-		if ((tp = mpool_getf(t->bt_mp, h->nextpg, 0)) == NULL) {
+		if ((tp = mpool_get(t->bt_mp, h->nextpg, 0)) == NULL) {
 			free(l);
 			/* XXX mpool_free(t->bt_mp, r->pgno); */
 			return (NULL);
@@ -799,7 +799,7 @@ bt_preserve(BTREE *t, pgno_t pg)
 {
 	PAGE *h;
 
-	if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+	if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 		return (RET_ERROR);
 	h->flags |= P_PRESERVE;
 	mpool_put(t->bt_mp, h, MPOOL_DIRTY);

Index: src/lib/libc/db/btree/bt_page.c
diff -u src/lib/libc/db/btree/bt_page.c:1.14 src/lib/libc/db/btree/bt_page.c:1.15
--- src/lib/libc/db/btree/bt_page.c:1.14	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_page.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_page.c,v 1.14 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_page.c,v 1.15 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_page.c,v 1.14 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_page.c,v 1.15 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -89,7 +89,7 @@ __bt_new(BTREE *t, pgno_t *npg)
 	PAGE *h;
 
 	if (t->bt_free != P_INVALID &&
-	    (h = mpool_getf(t->bt_mp, t->bt_free, 0)) != NULL) {
+	    (h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) {
 		*npg = t->bt_free;
 		t->bt_free = h->nextpg;
 		F_SET(t, B_METADIRTY);

Index: src/lib/libc/db/btree/bt_seq.c
diff -u src/lib/libc/db/btree/bt_seq.c:1.19 src/lib/libc/db/btree/bt_seq.c:1.20
--- src/lib/libc/db/btree/bt_seq.c:1.19	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/btree/bt_seq.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: bt_seq.c,v 1.19 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: bt_seq.c,v 1.20 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: bt_seq.c,v 1.19 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: bt_seq.c,v 1.20 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -181,7 +181,7 @@ __bt_seqset(BTREE *t, EPG *ep, DBT *key,
 		BT_CLR(t);
 		/* Walk down the left-hand side of the tree. */
 		for (pg = P_ROOT;;) {
-			if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 				return (RET_ERROR);
 
 			/* Check for an empty tree. */
@@ -205,7 +205,7 @@ __bt_seqset(BTREE *t, EPG *ep, DBT *key,
 		BT_CLR(t);
 		/* Walk down the right-hand side of the tree. */
 		for (pg = P_ROOT;;) {
-			if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 				return (RET_ERROR);
 
 			/* Check for an empty tree. */
@@ -299,7 +299,7 @@ __bt_seqadv(BTREE *t, EPG *ep, int flags
 	}
 
 	/* Get the page referenced by the cursor. */
-	if ((h = mpool_getf(t->bt_mp, c->pg.pgno, 0)) == NULL)
+	if ((h = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL)
 		return (RET_ERROR);
 
 	/*
@@ -327,7 +327,7 @@ __bt_seqadv(BTREE *t, EPG *ep, int flags
 			mpool_put(t->bt_mp, h, 0);
 			if (pg == P_INVALID)
 				return RET_SPECIAL;
-			if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 				return RET_ERROR;
 			idx = 0;
 		}
@@ -356,7 +356,7 @@ usecurrent:		F_CLR(c, CURS_AFTER | CURS_
 			mpool_put(t->bt_mp, h, 0);
 			if (pg == P_INVALID)
 				return RET_SPECIAL;
-			if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 				return RET_ERROR;
 			idx = NEXTINDEX(h) - 1;
 		} else
@@ -388,7 +388,7 @@ __bt_rseq_next(BTREE *t, EPG *ep)
 		/* Did we hit the right edge of the root? */
 		if (up == NULL)
 			return RET_SPECIAL;
-		if ((h = mpool_getf(t->bt_mp, up->pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, up->pgno, 0)) == NULL)
 			return RET_ERROR;
 		idx = up->index;
 	} while (++idx == NEXTINDEX(h));
@@ -398,7 +398,7 @@ __bt_rseq_next(BTREE *t, EPG *ep)
 		BT_PUSH(t, h->pgno, idx);
 		pg = GETBINTERNAL(h, idx)->pgno;
 		mpool_put(t->bt_mp, h, 0);
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return RET_ERROR;
 		idx = 0;
 	}
@@ -427,7 +427,7 @@ __bt_rseq_prev(BTREE *t, EPG *ep)
 		/* Did we hit the left edge of the root? */
 		if (up == NULL)
 			return RET_SPECIAL;
-		if ((h = mpool_getf(t->bt_mp, up->pgno, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, up->pgno, 0)) == NULL)
 			return RET_ERROR;
 		idx = up->index;
 	} while (idx == 0);
@@ -437,7 +437,7 @@ __bt_rseq_prev(BTREE *t, EPG *ep)
 		BT_PUSH(t, h->pgno, idx);
 		pg = GETBINTERNAL(h, idx)->pgno;
 		mpool_put(t->bt_mp, h, 0);
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return RET_ERROR;
 		idx = NEXTINDEX(h) - 1;
 	}
@@ -507,7 +507,7 @@ __bt_first(BTREE *t, const DBT *key, EPG
 					break;
 				if (h->pgno != save.page->pgno)
 					mpool_put(t->bt_mp, h, 0);
-				if ((hprev = mpool_getf(t->bt_mp,
+				if ((hprev = mpool_get(t->bt_mp,
 				    h->prevpg, 0)) == NULL) {
 					if (h->pgno == save.page->pgno)
 						mpool_put(t->bt_mp,
@@ -539,7 +539,7 @@ __bt_first(BTREE *t, const DBT *key, EPG
 		mpool_put(t->bt_mp, h, 0);
 		if (pg == P_INVALID)
 			return (RET_SPECIAL);
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			return (RET_ERROR);
 		ep->index = 0;
 		ep->page = h;

Index: src/lib/libc/db/mpool/mpool.c
diff -u src/lib/libc/db/mpool/mpool.c:1.22 src/lib/libc/db/mpool/mpool.c:1.23
--- src/lib/libc/db/mpool/mpool.c:1.22	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/mpool/mpool.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mpool.c,v 1.22 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: mpool.c,v 1.23 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mpool.c,v 1.22 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: mpool.c,v 1.23 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/queue.h>
@@ -55,7 +55,6 @@ __RCSID("$NetBSD: mpool.c,v 1.22 2016/09
 __weak_alias(mpool_close,_mpool_close)
 __weak_alias(mpool_filter,_mpool_filter)
 __weak_alias(mpool_get,_mpool_get)
-__weak_alias(mpool_getf,_mpool_getf)
 __weak_alias(mpool_new,_mpool_new)
 __weak_alias(mpool_newf,_mpool_newf)
 __weak_alias(mpool_open,_mpool_open)
@@ -194,7 +193,7 @@ mpool_delete(MPOOL *mp, void *page)
  */
 /*ARGSUSED*/
 void *
-mpool_getf(MPOOL *mp, pgno_t pgno, unsigned int flags)
+mpool_get(MPOOL *mp, pgno_t pgno, unsigned int flags)
 {
 	struct _hqh *head;
 	BKT *bp;
@@ -287,12 +286,6 @@ bp->flags |= MPOOL_INUSE;
 	return bp->page;
 }
 
-void *
-mpool_get(MPOOL *mp, pgno_t pgno)
-{
-	return mpool_getf(mp, pgno, 0);
-}
-
 /*
  * mpool_put
  *	Return a page.

Index: src/lib/libc/db/recno/rec_open.c
diff -u src/lib/libc/db/recno/rec_open.c:1.21 src/lib/libc/db/recno/rec_open.c:1.22
--- src/lib/libc/db/recno/rec_open.c:1.21	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/recno/rec_open.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rec_open.c,v 1.21 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: rec_open.c,v 1.22 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: rec_open.c,v 1.21 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: rec_open.c,v 1.22 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -197,7 +197,7 @@ slow:			if ((t->bt_rfp = fdopen(rfd, "r"
 	dbp->sync = __rec_sync;
 
 	/* If the root page was created, reset the flags. */
-	if ((h = mpool_getf(t->bt_mp, P_ROOT, 0)) == NULL)
+	if ((h = mpool_get(t->bt_mp, P_ROOT, 0)) == NULL)
 		goto err;
 	if ((h->flags & P_TYPE) == P_BLEAF) {
 		F_CLR(h, P_TYPE);

Index: src/lib/libc/db/recno/rec_search.c
diff -u src/lib/libc/db/recno/rec_search.c:1.15 src/lib/libc/db/recno/rec_search.c:1.16
--- src/lib/libc/db/recno/rec_search.c:1.15	Sat Sep 24 16:11:12 2016
+++ src/lib/libc/db/recno/rec_search.c	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rec_search.c,v 1.15 2016/09/24 20:11:12 christos Exp $	*/
+/*	$NetBSD: rec_search.c,v 1.16 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -34,7 +34,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: rec_search.c,v 1.15 2016/09/24 20:11:12 christos Exp $");
+__RCSID("$NetBSD: rec_search.c,v 1.16 2016/09/24 21:31:25 christos Exp $");
 
 #include "namespace.h"
 #include <sys/types.h>
@@ -77,7 +77,7 @@ __rec_search(BTREE *t, recno_t recno, en
 
 	BT_CLR(t);
 	for (pg = P_ROOT, total = 0;;) {
-		if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL)
+		if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL)
 			goto err;
 		if (h->flags & P_RLEAF) {
 			t->bt_cur.page = h;
@@ -113,7 +113,7 @@ __rec_search(BTREE *t, recno_t recno, en
 err:	sverrno = errno;
 	if (op != SEARCH)
 		while  ((parent = BT_POP(t)) != NULL) {
-			if ((h = mpool_getf(t->bt_mp, parent->pgno, 0)) == NULL)
+			if ((h = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
 				break;
 			if (op == SINSERT)
 				--GETRINTERNAL(h, parent->index)->nrecs;

Index: src/lib/libc/include/namespace.h
diff -u src/lib/libc/include/namespace.h:1.181 src/lib/libc/include/namespace.h:1.182
--- src/lib/libc/include/namespace.h:1.181	Sat Sep 24 16:12:07 2016
+++ src/lib/libc/include/namespace.h	Sat Sep 24 17:31:25 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: namespace.h,v 1.181 2016/09/24 20:12:07 christos Exp $	*/
+/*	$NetBSD: namespace.h,v 1.182 2016/09/24 21:31:25 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
@@ -489,7 +489,6 @@
 #define mpool_close		_mpool_close
 #define mpool_filter		_mpool_filter
 #define mpool_get		_mpool_get
-#define mpool_getf		_mpool_getf
 #define mpool_new		_mpool_new
 #define mpool_newf		_mpool_newf
 #define mpool_open		_mpool_open

Reply via email to