From nobody Wed Oct 11 08:20:52 2023 X-Original-To: dev-commits-src-all@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 4S55Lr3fbRz4x57B; Wed, 11 Oct 2023 08:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4S55Lr3C9Fz3dHw; Wed, 11 Oct 2023 08:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697012452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DPEU4DIKIg8OSnTvbB7wP662EZpaYsA6sJhCyF0Rqo=; b=jc+94Z+wYtT2hQHAgeJYhSjybXHuNPZxLXc3/nDVhxAoHxTIFtqpm3fOKcL6cs1uJfe09k 8RAqqg4I6po04ZBy509nC0utWfQAuzjcZR1TabkebpFtdSLQ8a8jzuZE3mEh457qGNAp5E fJcP21/pyYUkp8hZSStFxHyUCbQjT/WUbOypOcuknTGD3eNRLBhnrQ0XSZ8FBHhfKoLmSJ Ea64v3ozZj59RUGdQVcR1GDcrJ2H8AX2vBLi9Nf0KhnbDrIk0QDBFcRY4vZA+C19ZmQvJb nAg08vKZMLwYDpqxRsNobNtkdYShbHXVw91PZ+AL0f07CQVrBRO251WIY2Qi/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697012452; a=rsa-sha256; cv=none; b=M9uLvlkSbcPtCykq4omzZJGuDQ+3GWIq2lJrq/JTVymLmR1f8VI2ez7QBiPSRrOY/TuLN4 ClDuIOnAiRtoTI/WTq9J1WCKYSm1ZD1lPzWpEUQplBvDLSvtvk7yYWyOUGGOQ54PGOPfQK DyMnK+vn4rsD+7kKZsgTUFx9JELwGXvmF95gjKj22PxJ8dcuceWtKpKsSFyPkyfxOeZnNA 4shnH9NV8roaey0lo9WbHpQOxhsUgs0LTBpcdsPAGP3yR6lmVD5Yi5cD3zndkUkEz2y9hZ tCHlMdGQtT3T1ebEQ0q0wrF+zmdPir463TmHCXmjs/Xr4BDrHZhaXkkQ3W49Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697012452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2DPEU4DIKIg8OSnTvbB7wP662EZpaYsA6sJhCyF0Rqo=; b=L4gaOVTrp/r6J7hU+qzhSrwdBTJx8EdqyryMuiIuI8eIM0/msNEZLuo4sFrM7hZtwGkDbc UumwD11mRMoxjUUxiKibqs1xC99YACWvUJFpP7nDTq1NmbbSnp/ppPHnMgOlvXI6QZ5K3W B0gKPssMxicgYY87023WsOuOHTXQFXH/BpfeTzrlD1zdRyiOFtyLU40lYRTqF7H8+DMf+K XTBrI9YD1DRQkOgn5mRjO7dqFAnXPiX1Qqw2ytQD5iguc2pf10YcCx+F04KCb+uiHkfX/4 gdIQXa+yu9w/MrkDuMyz+cl2IiYIkhGwq/uoB7646S95r4ytV84wa0qpsC1D/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4S55Lr2FtVz1CZ1; Wed, 11 Oct 2023 08:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39B8KqVc079480; Wed, 11 Oct 2023 08:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39B8KqL7079477; Wed, 11 Oct 2023 08:20:52 GMT (envelope-from git) Date: Wed, 11 Oct 2023 08:20:52 GMT Message-Id: <202310110820.39B8KqL7079477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfonso S. Siciliano" Subject: git: 8df9efe877ec - main - bsdinstall: Fix command line argument list parsing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asiciliano X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8df9efe877eced9364dedaf804b06731ab502bb7 Auto-Submitted: auto-generated The branch main has been updated by asiciliano: URL: https://cgit.FreeBSD.org/src/commit/?id=8df9efe877eced9364dedaf804b06731ab502bb7 commit 8df9efe877eced9364dedaf804b06731ab502bb7 Author: Alfonso S. Siciliano AuthorDate: 2023-10-11 08:17:04 +0000 Commit: Alfonso S. Siciliano CommitDate: 2023-10-11 08:17:04 +0000 bsdinstall: Fix command line argument list parsing bsddialog(1) uses getopt_long(3) to parse command line argument list. Add '--' to avoid errors caused by arguments (menu items) begin with '-'. The change is compatible with dialog(1) and Xdialog(1). --- usr.sbin/bsdinstall/scripts/keymap | 2 +- usr.sbin/bsdinstall/scripts/zfsboot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/keymap b/usr.sbin/bsdinstall/scripts/keymap index 63f1f2455096..6f4060c0772e 100755 --- a/usr.sbin/bsdinstall/scripts/keymap +++ b/usr.sbin/bsdinstall/scripts/keymap @@ -195,7 +195,7 @@ while :; do --default-item \"\$defaultitem\" \ --menu \"\$prompt\" \ $height $width $rows \ - $menu_list \ + ${USE_DIALOG:+--} $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) || { f_quietly rm -f "$KEYMAPFILE" diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index a671841b15e5..619d11c56000 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -396,7 +396,7 @@ dialog_menu_main() --default-item \"\$defaultitem\" \ --menu \"\$prompt\" \ $height $width $rows \ - $menu_list \ + ${USE_DIALOG:+--} $menu_list \ 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD ) local retval=$?