Re: [V9fs-developer][PATCH v3 1/2] net/9p: detecting invalid options as much as possible
From: Andrew Morton
Date: Thu May 10 2018 - 18:31:15 EST
On Thu, 3 May 2018 17:44:35 +0800 Chengguang Xu <cgxu519@xxxxxxx> wrote:
> Currently when detecting invalid options in option parsing,
> some options(e.g. msize) just set errno and allow to continuously
> validate other options so that it can detect invalid options
> as much as possible and give proper error messages together.
> This patch applies same rule to option 'trans' and 'version'
> when detecting -EINVAL.
It does mean that if two or more options cause errors, we will now
return the error code arising from the final error rather than from the
first error (or from some mish-mash mixture of both, as the present
code does). But I don't think this matters.