mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-19 07:51:58 +08:00
Update to FreeBSD head 2016-08-23
Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
This commit is contained in:
@@ -38,7 +38,6 @@ static char sccsid[] = "@(#)bt_split.c 8.10 (Berkeley) 1/9/95";
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <rtems/bsd/sys/param.h>
|
||||
|
||||
#include <limits.h>
|
||||
@@ -238,9 +237,12 @@ __bt_split(BTREE *t, PAGE *sp, const DBT *key, const DBT *data, int flags,
|
||||
WR_BINTERNAL(dest, nksize ? nksize : bl->ksize,
|
||||
rchild->pgno, bl->flags & P_BIGKEY);
|
||||
memmove(dest, bl->bytes, nksize ? nksize : bl->ksize);
|
||||
if (bl->flags & P_BIGKEY &&
|
||||
bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
|
||||
goto err1;
|
||||
if (bl->flags & P_BIGKEY) {
|
||||
pgno_t pgno;
|
||||
memcpy(&pgno, bl->bytes, sizeof(pgno));
|
||||
if (bt_preserve(t, pgno) == RET_ERROR)
|
||||
goto err1;
|
||||
}
|
||||
break;
|
||||
case P_RINTERNAL:
|
||||
/*
|
||||
@@ -546,9 +548,12 @@ bt_broot(BTREE *t, PAGE *h, PAGE *l, PAGE *r)
|
||||
* If the key is on an overflow page, mark the overflow chain
|
||||
* so it isn't deleted when the leaf copy of the key is deleted.
|
||||
*/
|
||||
if (bl->flags & P_BIGKEY &&
|
||||
bt_preserve(t, *(pgno_t *)bl->bytes) == RET_ERROR)
|
||||
return (RET_ERROR);
|
||||
if (bl->flags & P_BIGKEY) {
|
||||
pgno_t pgno;
|
||||
memcpy(&pgno, bl->bytes, sizeof(pgno));
|
||||
if (bt_preserve(t, pgno) == RET_ERROR)
|
||||
return (RET_ERROR);
|
||||
}
|
||||
break;
|
||||
case P_BINTERNAL:
|
||||
bi = GETBINTERNAL(r, 0);
|
||||
|
Reference in New Issue
Block a user