From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 11F245A031A for ; Thu, 08 Aug 2024 06:44:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1723092287; bh=JP1tI+3lS8+bakWLPl9o+kxnofjWW/KhGMInN8xdcNE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NZ9sxIlfnzli01lSvEtg59AbIu3VnXsVVaewZyKtKP12Pyx+k/humokQkmybi5efE H+87tlokrZbArcU3mnkTDZXx35LceBmsAzrIkiaLWEEw+tLAxrg1XpgLkz71TxrMfL +4/SDu6B/oFy9nOfmlJuM3TmHjwaXbEXx3FiU8KumzBzMTw5ucneb8tQ5q1nOw24GS xHwZbwXgS14E8s7bce70iZ/0LE66OA6MBVWpTXJnCYdntKIi7wgJl4wjJ/fIjpXjhd 22oNu4zQZNG8Ta93fsmkpNATulj14dbLo/w170A0iiMBpCVLYSB3zQjuFuZ5CLxgu/ ix2lTvQRnEjQQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WfZG71nGRz4wcl; Thu, 8 Aug 2024 14:44:47 +1000 (AEST) Date: Thu, 8 Aug 2024 14:44:41 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3] conf: Stop parsing options at first non-option argument Message-ID: References: <20240808040251.2568850-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3DU5xb6BQOf1k3ys" Content-Disposition: inline In-Reply-To: <20240808040251.2568850-1-sbrivio@redhat.com> Message-ID-Hash: IHQZ5KINODSVWUVPDW6S2C6QCJJLUMIG X-Message-ID-Hash: IHQZ5KINODSVWUVPDW6S2C6QCJJLUMIG X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Paul Holzinger X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --3DU5xb6BQOf1k3ys Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 08, 2024 at 06:02:51AM +0200, Stefano Brivio wrote: > Given that pasta supports specifying a command to be executed on the > command line, even without the usual -- separator as long as there's > no ambiguity, we shouldn't eat up options that are not meant for us. >=20 > Paul reports, for instance, that with: >=20 > pasta --config-net ip -6 route >=20 > -6 is taken by pasta to mean --ipv6-only, and we execute 'ip route'. > That's because getopt_long(), by default, shuffles the argument list > to shift non-option arguments at the end. >=20 > Avoid that by adding '+' at the beginning of 'optstring'. >=20 > Reported-by: Paul Holzinger > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --3DU5xb6BQOf1k3ys Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAma0TTgACgkQzQJF27ox 2GfFBQ//UE/zLCDZUcJfm/7YyLghYa5zPTIxdHEsCOSPqkGKp8/aBPUW3vkVhVRc noPcU2eTOi4Vap3onzb0qDs9fryNw/Idesbo4Wp9R8FSzeLILZS0Mu8wukmEoSjJ taTZCbHMpzRN3Wo1spRCh3lW89NmHhUvnarKoTgMXfjBYc7s+68elFo9RDvkmTFL NfydP1Rw6P5hYWM9083UkCw2vfh2t12SI6HcRkNSdoLBAABYg5R0wyy8NlqWU5B/ PnZh0nX904EMZ3tD0Sb2HmomXUPr8i+miV7+28JM/deNb5S+LP6mtDPs6cwKIP8s nZSZuQ6uQI+ujgbAFSHw7R4yZ5vuTQXNAaTGHGmkzN/dRP529rfE+vhZbSvMFWKJ 4B06GR0DnwKnf7uOli4X+fsHoW9PgaiAYyT8yqXTBssmYfezYpn4EoQmHrQLQOl7 S9PgGlpFPkBum0lrA3jI7lbECa1WgBWR6sgg6A0hRFepYALnlGrj4qxTV0DhlyI0 kbcZk7kSc00zEPovoeay2MJZb5IQGSxLAkWgL9EPY6q3NWDDpY2qOl15OyIy6EsM Grrx+QR9mmE1eUMOpG8sExaO0yBdhtuPzm6u20C8FSdIhkRAvR2PBUSsNd+XGOm4 96Hd4JD/xzD+CFojtDEFsva5pfpFuPnGZ0gY0E5CYzE/6IvZ4/g= =qSIL -----END PGP SIGNATURE----- --3DU5xb6BQOf1k3ys--