From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 80DB05A026D for ; Thu, 16 Feb 2023 06:43:23 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4PHP4K6qYkz4x8J; Thu, 16 Feb 2023 16:43:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1676526193; bh=5DZe33TG0NU8WVkM1Iktp2+zvUa3f4I19vRYcGM5ujA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UX/jO9fJ60BfxWNyN1GuTV0sYalsGAJNeWnE1eNkgJpsBrSbgDuUCpQvAaJaFZ1fs ls33VC1ZyiY2SfAjXDSo5Af5I50rRfBxzESXjXXzl+6vU5OTE3A8euuJWAd1ISOl+7 o3MVX0kuZ96Xx/+P8GvPv6U/iyAzrJ3SEnasza2Y= Date: Thu, 16 Feb 2023 16:39:17 +1100 From: David Gibson To: Laine Stump Subject: Re: [PATCH v4 8/9] log a detailed error (not usage()) when there are extra non-option arguments Message-ID: References: <20230215082437.110151-1-laine@redhat.com> <20230215082437.110151-9-laine@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lbZPftjaz0sYqnin" Content-Disposition: inline In-Reply-To: <20230215082437.110151-9-laine@redhat.com> Message-ID-Hash: AWR3O3GBVJUXUALV5THMHYI4GHA7YGZS X-Message-ID-Hash: AWR3O3GBVJUXUALV5THMHYI4GHA7YGZS 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 X-Mailman-Version: 3.3.3 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: --lbZPftjaz0sYqnin Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 15, 2023 at 03:24:36AM -0500, Laine Stump wrote: > Signed-off-by: Laine Stump Reviewed-by: David Gibson > --- > conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/conf.c b/conf.c > index d020b4f..f175405 100644 > --- a/conf.c > +++ b/conf.c > @@ -1536,7 +1536,7 @@ void conf(struct ctx *c, int argc, char **argv) > if (c->mode =3D=3D MODE_PASTA) > conf_pasta_ns(&netns_only, userns, netns, optind, argc, argv); > else if (optind !=3D argc) > - usage(argv[0]); > + die("Extra non-option argument: %s", argv[optind]); > =20 > isolate_user(uid, gid, !netns_only, userns, c->mode); > =20 --=20 David Gibson | 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 --lbZPftjaz0sYqnin Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmPtwX8ACgkQzQJF27ox 2Ge6bBAAh4UBaE3pihbQ3POeHv7REqzpkWtd4fSCJ6cN9KB0wzstIJmlFz89jgpC aDFX3y+h4FmCtt7T+Gwei+za4TSPYeNP6VFlewWzsCvEIKOyFb+d5S2JpJEgoBQN iyxa3A8NYtAYgV2Xzv2FPFG21eSyEVcefr9LhP65FSUOGYGC7Pc0rD4apfsXZ7D7 XFAiUttP5eGgo297SIir8QSD6QBKs9dmGVExAcIhMJ/zvqFE/31/UyciPH4H2BhC YeyKAa5LQRnRTNHNslRay3oQDFr/U052ysduya+5cjBVLCB1volukmMSRHmWiacu piH1mxRJtpfxjHq7tcY+E6Wg6Mtekjdwpiz6SFuZGPKdrKMGc2yJ/C8LSFKGObdU Xs4kC/3DWNLNJ6rkwtSVUEEfOgJfLmTXWBa/JJvhv56R9RJ0EriwWs9Toy0YVkOd LUxkhkA4RK9rryjyr/+Nr5jA5vRHuhRRM533lWbieSC6wCu9kdfvvoD8g8i7MjxI uUPX9Y00Ol4q1FkrIQzw8wa9YGDapeL9M3fX82eUoPkJRNdouXFGkT824oO933e7 bY/Zzm42Up/aNUvK4Tau0cJ64E+qS1QJl1U0zTFruFdb/em1Ok5WWc7zpsUvyJ65 HPLOHkzYEmy5MXv2NOKCPjHYGa1vpDeqNdqPoNrOYudOjqbem2M= =SOc0 -----END PGP SIGNATURE----- --lbZPftjaz0sYqnin--