From nobody Sat Apr 30 18:03:45 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 BF6D91AABEB0; Sat, 30 Apr 2022 18:03:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KrHKc4lhRz3Ndv; Sat, 30 Apr 2022 18:03:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pj1-x1032.google.com with SMTP id j8-20020a17090a060800b001cd4fb60dccso9790287pjj.2; Sat, 30 Apr 2022 11:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=2YPIHYbu7qIGovz/JcBWjjQ/G5nq7vvV4g/lPiHveRQ=; b=nykc1NjmhonPuJNZ7QCr0hKazOCRbUz1uis7SE8QtmzPNIGQh7FKnwh1+HRLkCzw+X EqIq1rswuL4by/hfA6gtvcS8To7COTMEHUn9uARV16U8hxCKPUOdUZfOM877EK08zVBP QvDyFy9p93N53MNdYHVREal27A2T9Kc2cx6qLjyySq3yFD5rpp+qItoYmFthMUrwL1o7 Ejdwpn0ovgkhGRhmt8fQLHhSH19zRFqgEX1An8vFH106ILjq60F3w/+NsQEQnx+c/fFD Nf7+wLBziKIhWt0+D5gIc0BnGmABSesV5JwRIQAIPlzLrnsLGmcie0IW2AsDpZAzio5l BQlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=2YPIHYbu7qIGovz/JcBWjjQ/G5nq7vvV4g/lPiHveRQ=; b=Pqn23R38unS17X3jCr6BZsrMrL72gSuLRGa98GAbBSdkFbphaKX+02viKlXqnujZqO wl9bIxnFk4BXeO/75Dvv3yj7zJh9NkfcNwVfxDKLp0ovRR5RMQcUvrSqLNEcF43wu58n KC4SWKOhtNIgGPuojSPCGdGfR7PqY+KDSv5lGAqx4U0nCGmVqqbl6usy6W9IFzhaCNNi 7ydxPChhQSPXT8nLJCS7Kp37d5aWiIs9YmibZVsm1P/WhC1lokvOqnplzj4IlMLcFCN1 QxwWXuoGtipWmrrB9rqerT3lInmR6eaHne8GJ92IOX0MNdQEw7HgxljGUBvNiANhzk6n rXmQ== X-Gm-Message-State: AOAM533XRFQojyaq9lcgrEgODP9J7O01DmSfHlJd9B0PNEDK0/B2PIrz j7b8oU34mums12gV4ocMWDWt79jy3O8= X-Google-Smtp-Source: ABdhPJwCaFyND687oeP7qnMNhyj6mD/p8wLNdv1RaklfKSMOuVlUrmGwtgDoIWWCvopZ75hScxeqiQ== X-Received: by 2002:a17:903:240a:b0:14e:dad4:5ce4 with SMTP id e10-20020a170903240a00b0014edad45ce4mr4563975plo.125.1651341827419; Sat, 30 Apr 2022 11:03:47 -0700 (PDT) Received: from smtpclient.apple (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id az10-20020a170902a58a00b0015e8d4eb227sm1752857plb.113.2022.04.30.11.03.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Apr 2022 11:03:46 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_F5145C38-FDCB-48FF-83FB-6AA942E79810"; protocol="application/pgp-signature"; micalg=pgp-sha256 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 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: git: 9b4c606b96ce - main - bsdinstall/partedit: Fix UFS auto partitioning From: Enji Cooper In-Reply-To: <20220430002011.4zpqn3l4c3wsc3vm@mutt-hbsd> Date: Sat, 30 Apr 2022 11:03:45 -0700 Cc: "Alfonso S. Siciliano" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <96AF5357-134A-4427-90C4-7DFBBCA9B1B6@gmail.com> References: <202204292324.23TNOusA058900@gitrepo.freebsd.org> <20220430002011.4zpqn3l4c3wsc3vm@mutt-hbsd> To: Shawn Webb X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4KrHKc4lhRz3Ndv X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_F5145C38-FDCB-48FF-83FB-6AA942E79810 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 29, 2022, at 5:20 PM, Shawn Webb = wrote: >=20 > On Fri, Apr 29, 2022 at 11:24:56PM +0000, Alfonso S. Siciliano wrote: >> The branch main has been updated by asiciliano: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9b4c606b96ce8a8b011dc50295c71c38= 741a0f4f >>=20 >> 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 >>=20 >> bsdinstall/partedit: Fix UFS auto partitioning >>=20 >> 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: >>=20 >> * 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. >>=20 >> Reviewed by: bapt >> Differential Revision: https://reviews.freebsd.org/D35033 >> --- >> usr.sbin/bsdinstall/partedit/gpart_ops.c | 6 ++++++ >> 1 file changed, 6 insertions(+) >>=20 >> 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 =3D true; >> goto addpartform; >> } >> + } else { /* auto partitioning */ >> + items[0].value =3D strdup(items[0].init); >> + items[1].value =3D strdup(items[1].init); >> + items[2].value =3D strdup(items[2].init); >> + if (nitems > 3) >> + items[3].value =3D strdup(items[3].init); >> } >>=20 >> /* >>=20 >=20 > Hey Alfonso, >=20 > Would it be a good idea to check the return value of strdup in this > particular case? An assert would work here, but the program wouldn=E2=80=99t get very = far. It would be nice if we had a macro or function that does this like = (IIRC) some of the other BSDs do. -Enji --Apple-Mail=_F5145C38-FDCB-48FF-83FB-6AA942E79810 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAmJtegEACgkQ5JFNMZeD GN7urBAAm8Nb0lHMRxqLwaLcZhUgmmavgPzMArk2/RiFkC/LSsUUxV8gs8Fk7ruQ OvD1RGl33JW2y5siN42R9/tMQ6Q9fSs90PhMYvYaMBA/nexAF/FeFw5VON0EdbUQ +8VuFwHk5kuajsdeTvD1GIcJWF3Mlfal5XLOtWpQHYYNn/qGLr/bUo6RBy3zO7tK DzfF9n1vFArIKkeHjphAHAXz5EzzlrDJ1+z2OYBhJwCmtYHthkRWV6xtsUr2L7dx uXDbtD/e0sfKCl58ZOzYAqPtDvXjXqtzextyEbSzctL80kKBhc5EwPK7I1D4sK0q XNTXbCyFaVD2e+Tll71Txn5K6G0B7fYbssO8/BeV3ZKIR6JFsCTZO9Gl4cSBwwzi u2UvNBYiMcwNpB6OvzqPSqRjT4VQEeSvX74lBLusk0HjZd4oovxX3GdEIpSZAca+ bFiigsiUIMYJPcyCqwE5tu4qEuH/48jSvXzwfrSxheV9EaB+sFOFjWnCIA64gHmQ 3LrybKkwx4+MrBQ6m0mHK8j2252X4EqcqrBXoD9NdHyyY2ZRJ7jG2Pm3RfQsv9NZ 9ACpUpPh5RqB16mBvmghOuyvtXxnyP8x5UUyZtpokO7fUwIqGpcmE1Nb5aVv7Bk3 DRt0hITf7a9R/hShlgAfyBOBTJ4SveNfFiWm08vjRFmNhA2D17w= =qcXv -----END PGP SIGNATURE----- --Apple-Mail=_F5145C38-FDCB-48FF-83FB-6AA942E79810--