Re: [PATCH crosvm v2] crosvm: support setting guest MAC from tap-fd

Cole Helbling
2021-05-18T15:46:17Z

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.