From: "Christopher Obbard" <chris.obbard@collabora.com>
To: Hajime Tazaki <thehajime@gmail.com>
Cc: richard@nod.at, jdike@addtoit.com, linux-um@lists.infradead.org,
anton.ivanov@cambridgegreys.com
Subject: Re: [PATCH] um: ubd: fix command line handling of ubd
Date: Tue, 22 Dec 2020 11:49:05 +0000 [thread overview]
Message-ID: <5f11-5fe1dd00-6d-1cae2c20@60061556> (raw)
In-Reply-To: <20201221022434.21725-1-thehajime@gmail.com>
Hi Hajime,
Doh! Thanks for sorting out this regression!
On Monday, 21 December, 2020 02:24 GMT, Hajime Tazaki <thehajime@gmail.com> wrote:
> This commit fixes a regression to handle command line parameters of ubd.
> With a simple line "./linux ubd0="./disk-ext4.img", it fails at
> ubd_setup_common(). The commit adds additional checks to the variables
> in order to properly parse the paremeters which previously worked.
>
> Fixes: ef3ba87cb7c9 ("um: ubd: Set device serial attribute from
> cmdline")
> Cc: Christopher Obbard <chris.obbard@collabora.com>
> Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
Acked-by: Christopher Obbard <chris.obbard@collabora.com>
> ---
> arch/um/drivers/ubd_kern.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index 13b1fe694b90..bd16b17ba4d6 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -375,11 +375,11 @@ static int ubd_setup_common(char *str, int *index_out, char **error_out)
> file = NULL;
>
> backing_file = strsep(&str, ",:");
> - if (*backing_file == '\0')
> + if (backing_file && *backing_file == '\0')
> backing_file = NULL;
>
> serial = strsep(&str, ",:");
> - if (*serial == '\0')
> + if (serial && *serial == '\0')
> serial = NULL;
>
> if (backing_file && ubd_dev->no_cow) {
> --
> 2.17.2
>
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2020-12-22 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 2:24 [PATCH] um: ubd: fix command line handling of ubd Hajime Tazaki
2020-12-22 11:49 ` Christopher Obbard [this message]
2020-12-23 10:19 ` Richard Weinberger
2021-01-04 10:56 ` Christopher Obbard
2021-01-04 11:18 ` Richard Weinberger
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=5f11-5fe1dd00-6d-1cae2c20@60061556 \
--to=chris.obbard@collabora.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=jdike@addtoit.com \
--cc=linux-um@lists.infradead.org \
--cc=richard@nod.at \
--cc=thehajime@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox