patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: Cole Helbling <cole.e.helbling@outlook.com>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH crosvm v2] crosvm: support setting guest MAC from tap-fd
Date: Sat, 29 May 2021 14:08:31 +0000	[thread overview]
Message-ID: <87h7ilr5sw.fsf@alyssa.is> (raw)
In-Reply-To: <SJ0PR03MB55810100B5BFAD466902ED26B32C9@SJ0PR03MB5581.namprd03.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]

"Cole Helbling" <cole.e.helbling@outlook.com> writes:

> On Tue May 18, 2021 at 1:36 AM PDT, Alyssa Ross wrote:
>> "Cole Helbling" <cole.e.helbling@outlook.com> writes:
>> > Is there a better Error variant for this? `TooManyArguments` seems not-
>> > completely-accurate when specifying an already-in-use FD.
>>
>> Here are all the variants.  Do you think there's a better one?
>>
>> https://chromium.googlesource.com/chromiumos/platform/crosvm/+/f35d2c43ff19520855cffee761dc8899c5a439a1/src/argument.rs#49
>>
>> The only other one I can see that might be applicable would be
>> InvalidValue...
>
> Yeah, I think InvalidValue would be a better choice (IMHO). The user hasn't
> provided too many arguments; they just provided a invalid TAP FD because it's
> already in use.

Hmm, I agree with you, but I just went to make this change, and noticed
that everywhere else in the file, they use TooManyArguments for this
sort of case.  e.g. "wayland socket name already used".  So I think it's
probably best to stick with TooManyArguments for consistency (and that's
probably why I did it like that in the first place, although I don't
remember).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2021-05-29 14:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 18:57 [PATCH crosvm v2] crosvm: support setting guest MAC from tap-fd Alyssa Ross
2021-05-17 19:20 ` Cole Helbling
2021-05-18  8:36   ` Alyssa Ross
2021-05-18 15:43     ` Cole Helbling
2021-05-29 14:08       ` Alyssa Ross [this message]
2021-05-30  2:20         ` Cole Helbling

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7ilr5sw.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=cole.e.helbling@outlook.com \
    --cc=devel@spectrum-os.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).