From owner-svn-src-all@freebsd.org Sun Nov 15 20:13:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9A19467D3C; Sun, 15 Nov 2020 20:13:23 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CZ3LC3Tjnz3PSG; Sun, 15 Nov 2020 20:13:23 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 290D4A57; Sun, 15 Nov 2020 15:13:20 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 15 Nov 2020 15:13:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=c R03pZ73a6kXnvliYSrdRdWz42vyv0krtUeuI0Ut9m0=; b=Hxi7QP81Q2e+Xto1s 6DF+k9EnAzQ7j/lRdPHFn4iJkjEOy2xhHEzzbJu0A5dUjIhp6yAarXnhEZSu2Fyd ZB8isZmHsnfuCl/qZZHEBFM5wwO0oKxWfEhmFZ3RpzrgAkQKgRydNu8A7LBQwlH8 UrbafzK988g37OcQaVyqc76+Zhq0sfzQBanLicibtHegtNI93VrMCfj7KffxSe25 iBJci8W8vSGtg0CqPk1o3wyn+tJKlbdqDNU54p4wwATVQr+XWkhsEKkENR5Y0K8K Bk1jFOuhuso3BMZW3DF1tjvsbsBqTYIU+LCk5Ei4wgHk719QnzuCRSrx1kXybV1i Gmang== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=cR03pZ73a6kXnvliYSrdRdWz42vyv0krtUeuI0Ut9 m0=; b=iTFS37g+ad/LowvkfvjvoTFMwHUztdggQSrVc1wSv8NEufgRzQAk9zIIk 01AdtcgaXai1JrCPtDax4h0kUx5MQirfEYqgk7BbuRJOro7DnAXMOc/AZ7SA5WD3 XnphwbAe2B17U0QDr5af1bGvrwfxDtrzXIfz7GjlBjM/MfSQ/qZKM0QU37xwTULR CN4fr3c/w1Emhb9HBGWACxeF+kntYIzoCyzUGQx4QvqOniFNIuu9CvsBQEa2xZ4L y/zfW3eb6h+8r8EMG4qOBXV8SKPuv4ibzBD5BKickA8vmpyv+ZmvgP8wySuiGI5P 63gynz6hDESSyaBHX1uYfYfqaQn8w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvledgudefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutgho thhtucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucggtffrrghtth gvrhhnpeduudevkeehheeiudekkeelleevudefveeftedugfdtffetffelheehffeufffg heenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucfkphepkedrgeeirdekledrvd dufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehs tghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.0.114] (unknown [8.46.89.213]) by mail.messagingengine.com (Postfix) with ESMTPA id ED14D3064AA6; Sun, 15 Nov 2020 15:13:18 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: svn commit: r367701 - head/lib/libutil From: Scott Long In-Reply-To: Date: Sun, 15 Nov 2020 13:13:18 -0700 Cc: Jessica Clarke , Scott Long , src-committers , svn-src-all , svn-src-head , Stefan Esser Content-Transfer-Encoding: quoted-printable Message-Id: <9578C457-F9C9-4B27-ACCE-1B66256B06A9@samsco.org> References: <202011150748.0AF7mqW3016900@repo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4CZ3LC3Tjnz3PSG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Nov 2020 20:13:23 -0000 > On Nov 15, 2020, at 1:05 PM, Warner Losh wrote: >=20 > Hey Scott, >=20 > On Sun, Nov 15, 2020 at 11:46 AM Scott Long wrote: > The man page for strlcpy() made reference to the return value being > equivalent to what snprintf() does. The man page for snprintf() = states > that negatve return values are possible, so I assumed the same was > true for strlcpy(). However, now that I=E2=80=99ve looked at the = implementation > of strlcpy(), I see that you=E2=80=99re correct. The man pages are = definitely > confusing, and this isn=E2=80=99t the only place where I think = there=E2=80=99s > inconsistency in the documentation, or at least poor wording choices. >=20 > Yea, it says both that it will never return a negative value (since = size_t is never negative) and that it returns the same things as = snprintf (which is true... except for that detail which it glosses over = in return type differences). >=20 > So this issue doesn't get lost, I've added a clarification to the = examples in https://reviews.freebsd.org/D27228 . Please take a look and = let me know what you think. If more extensive edits are needed, there's = full context so you can at least flag those in the review as well. I've = read these too many times to see the other places you're talking about, = so a fresh set of eyes would be helpful. >=20 The wording on whether or not strlcpy and strlcat will provide NULL = termination is also inconsistent, hence my comments about it last = weekend. I=E2=80=99m going to revert all of this back to and including = r367075, since Stefan wants to do this a totally different way. Sorry = for the noise everyone and thanks for the help, I learned a lot through = this process. Scott