From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 21:29:35 2014 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 238E31B9 for ; Tue, 4 Mar 2014 21:29:35 +0000 (UTC) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF7B9D11 for ; Tue, 4 Mar 2014 21:29:34 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id 40708B5236; Tue, 4 Mar 2014 21:29:26 +0000 (UTC) Date: Tue, 4 Mar 2014 22:29:26 +0100 From: Jeremie Le Hen To: freebsd-hackers@FreeBSD.org Subject: RFC: patch to libc/db/btree/bt_put.c Message-ID: <20140304212925.GA47398@caravan.chchile.org> Mail-Followup-To: freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="sm4nu43k4a2Rpi4c" Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2014 21:29:35 -0000 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I'd like to commit the following patch so DB_TREE's put() will accept the R_SETCURSOR flag as documented in the dbopen(3) manpage. Does that look good to you guy, or am I misreading the doc? Also, does this look OK to MFC? I think so, but better ask than be sorry. -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. --sm4nu43k4a2Rpi4c Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="db_btree_put_R_SETCURSOR.diff" Index: btree/bt_put.c =================================================================== --- btree/bt_put.c (revision 262751) +++ btree/bt_put.c (working copy) @@ -55,7 +55,7 @@ static EPG *bt_fast(BTREE *, const DBT *, const DB * dbp: pointer to access method * key: key * data: data - * flag: R_NOOVERWRITE + * flag: R_NOOVERWRITE, R_SETCURSOR * * Returns: * RET_ERROR, RET_SUCCESS and RET_SPECIAL if the key is already in the @@ -91,6 +91,7 @@ __bt_put(const DB *dbp, DBT *key, const DBT *data, switch (flags) { case 0: case R_NOOVERWRITE: + case R_SETCURSOR: break; case R_CURSOR: /* --sm4nu43k4a2Rpi4c--