* [PATCH ucspi-vsock] configure: reject invalid arguments
@ 2021-03-21 19:39 Alyssa Ross
2021-03-22 0:18 ` Cole Helbling
0 siblings, 1 reply; 3+ messages in thread
From: Alyssa Ross @ 2021-03-21 19:39 UTC (permalink / raw)
To: devel
But we preserve the autoconf behaviour of only warning on invalid
options.
$ ./configure --test
Warning: unrecognized options: --test
$ ./configure test
Error: unexpected argument: test
---
configure | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 38c926c..938db10 100755
--- a/configure
+++ b/configure
@@ -29,8 +29,11 @@ for arg; do
prefix="$(printf "%s" "$arg" | cut -d= -f2-)"
elif printf "%s" "$arg" | grep -q "^--bindir="; then
bindir="$(printf "%s" "$arg" | cut -d= -f2-)"
- else
+ elif printf "%s" "$arg" | grep -q "^--"; then
unrecognized="$unrecognized $arg"
+ else
+ echo "Error: unexpected argument: $arg" >&2
+ exit 64 # EX_USAGE
fi
done
--
2.30.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ucspi-vsock] configure: reject invalid arguments
2021-03-21 19:39 [PATCH ucspi-vsock] configure: reject invalid arguments Alyssa Ross
@ 2021-03-22 0:18 ` Cole Helbling
2021-03-22 12:16 ` Alyssa Ross
0 siblings, 1 reply; 3+ messages in thread
From: Cole Helbling @ 2021-03-22 0:18 UTC (permalink / raw)
To: Alyssa Ross, devel
On Sun Mar 21, 2021 at 12:39 PM PDT, Alyssa Ross wrote:
> But we preserve the autoconf behaviour of only warning on invalid
> options.
>
> $ ./configure --test
> Warning: unrecognized options: --test
>
> $ ./configure test
> Error: unexpected argument: test
> ---
> configure | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ucspi-vsock] configure: reject invalid arguments
2021-03-22 0:18 ` Cole Helbling
@ 2021-03-22 12:16 ` Alyssa Ross
0 siblings, 0 replies; 3+ messages in thread
From: Alyssa Ross @ 2021-03-22 12:16 UTC (permalink / raw)
To: Cole Helbling; +Cc: devel
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
On Sun, Mar 21, 2021 at 05:18:33PM -0700, Cole Helbling wrote:
> On Sun Mar 21, 2021 at 12:39 PM PDT, Alyssa Ross wrote:
> > But we preserve the autoconf behaviour of only warning on invalid
> > options.
> >
> > $ ./configure --test
> > Warning: unrecognized options: --test
> >
> > $ ./configure test
> > Error: unexpected argument: test
> > ---
> > configure | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Committed as 6fb32b8.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-22 12:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-21 19:39 [PATCH ucspi-vsock] configure: reject invalid arguments Alyssa Ross
2021-03-22 0:18 ` Cole Helbling
2021-03-22 12:16 ` Alyssa Ross
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).