From nobody Sun May 01 15:59:07 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8F8C0199DAB2; Sun, 1 May 2022 15:59:08 +0000 (UTC) (envelope-from asiciliano@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KrrWJ3gPvz4cxM; Sun, 1 May 2022 15:59:08 +0000 (UTC) (envelope-from asiciliano@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651420748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1TNDn40S3V5xPnaXt5Uatm6WM5/9e5B9TnY8R4CVrKY=; b=amLRBEuqyDf3mJFk+gzoSX+GiIJNSxAECvFOxQ66ILkA54SY/8dobTxirfL2wcq+3LUhrd jTHDFPLhLPeX20tw9AuAVMuu5rETuETl3xzgGtn8zQA8w+Jf856eeDhuzd8T22B2bSW7Tr ptkGg6YNvYp2jkvtcvTbpTY636m5nBJA+1utFRKi/e7xT3jEsd8lHVYdnkRjipZ+yRdWHc QwAMnNRMmYMqV5h7VBuyIBcu++U4GzKj2Q0nser6+BPixH+IcfHNWLR8qYGbuDqBSOCORO 15v9rPx/zfrh97PbyluAmh6hGXP5Lr2PRlAJ38DsDdCAtzhVkXjNp3uLcWpY2g== Received: from [192.168.1.9] (host-79-18-199-201.retail.telecomitalia.it [79.18.199.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: asiciliano) by smtp.freebsd.org (Postfix) with ESMTPSA id C1D212E073; Sun, 1 May 2022 15:59:07 +0000 (UTC) (envelope-from asiciliano@FreeBSD.org) Message-ID: Date: Sun, 1 May 2022 17:59:07 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: git: 9b4c606b96ce - main - bsdinstall/partedit: Fix UFS auto partitioning Content-Language: en-US To: Shawn Webb Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202204292324.23TNOusA058900@gitrepo.freebsd.org> <20220430002011.4zpqn3l4c3wsc3vm@mutt-hbsd> From: "Alfonso S. Siciliano" In-Reply-To: <20220430002011.4zpqn3l4c3wsc3vm@mutt-hbsd> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651420748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1TNDn40S3V5xPnaXt5Uatm6WM5/9e5B9TnY8R4CVrKY=; b=JU87lZokLU56+S63cUbYozDkqz4ojvyBwZhIvdg+tAU4z7y8x+AADHI1pdsr7dRjDsYf/W P9ocGZE/f+DwlgES3GImrq3UlSQP9y9+BJj1g2j0GIxPC2v2VIb+fokdQt1Uk1lpMcz0Oq Idv5D/h6m2LKYEZIf+c1eulEH3+yIvV9R+w7ZJRG0Luj379+DBHnKDa2cWbT2txEFBWnNN gWqSb13cF3wKUcxkFPrUPf9+X2UiSpoVjVkuRdSyW3517OLBbvtuDwXroqY/bPvIOn+tXk TItOdcHjO8pP8i7kLYDwIHGFXXzG9aAKOkYH9kIXy2V9FG3tubBunALXb4KYzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651420748; a=rsa-sha256; cv=none; b=uLPBoWm9tr+0kT+in1fBzOA/P+OzVNqLVBJ0TX0aeNNqNJc6bFJK4cS5hvL9hgJ/G7CVOe m+kzKjaQPOmrw1+J/kTd8BNdxdogVNP22jRVIVk6aTEbkbBzU8VWRP2VHPBbpEegtdZgI+ KfjnzGh6bFGCHWdQmu9mN1H3H27ctcrxaA2cyhdvuqQKAWAWt/UlyAqZwYtxog6FiWwWzD X8nMyY/XCs+i4gkGNnsnxE9sj62Se8GckRrZtdxT3Gw9G1IdsWXGXYZTiQn+XbdwERgrvW 6Yzq/dKb3IXdBH1L65FTk59+ZrvyeWM81AfwndXOVB6Y+GWmi66W5+w8s2x+qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 4/30/22 02:20, Shawn Webb wrote: > On Fri, Apr 29, 2022 at 11:24:56PM +0000, Alfonso S. Siciliano wrote: >> The branch main has been updated by asiciliano: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=9b4c606b96ce8a8b011dc50295c71c38741a0f4f >> >> commit 9b4c606b96ce8a8b011dc50295c71c38741a0f4f >> Author: Alfonso S. Siciliano >> AuthorDate: 2022-04-29 23:19:30 +0000 >> Commit: Alfonso S. Siciliano >> CommitDate: 2022-04-29 23:24:23 +0000 >> >> bsdinstall/partedit: Fix UFS auto partitioning >> >> Fix bsdinstall "Auto (UFS) Guided Disk Setup" and sade(8) "Auto". >> The problem is a string comparison failure, it arose during the >> dialog(3)/bsddialog(3) form conversion: >> >> * dialog uses only form.text while bsdialog differentiates between >> form.init and form.value. >> * dialog always allocates memory for form values while bsddialog only >> when a button is pressed. >> >> Reviewed by: bapt >> Differential Revision: https://reviews.freebsd.org/D35033 >> --- >> usr.sbin/bsdinstall/partedit/gpart_ops.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/usr.sbin/bsdinstall/partedit/gpart_ops.c b/usr.sbin/bsdinstall/partedit/gpart_ops.c >> index 65cda247e146..26aedb58ef39 100644 >> --- a/usr.sbin/bsdinstall/partedit/gpart_ops.c >> +++ b/usr.sbin/bsdinstall/partedit/gpart_ops.c >> @@ -1154,6 +1154,12 @@ addpartform: >> init_allocated = true; >> goto addpartform; >> } >> + } else { /* auto partitioning */ >> + items[0].value = strdup(items[0].init); >> + items[1].value = strdup(items[1].init); >> + items[2].value = strdup(items[2].init); >> + if (nitems > 3) >> + items[3].value = strdup(items[3].init); >> } >> >> /* >> > > Hey Alfonso, > > Would it be a good idea to check the return value of strdup in this > particular case? Hi Shawn, Thanks for the report, maybe it could be a bit superfluous in this context. However, I have not a strong opinion so I opened a review . Best regards, Alfonso