[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cmdline: only set ask mode if vga= is present


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 10 Jul 2023 18:27:06 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hzBtm0/T/QzvcYKk3AIn+WHZc+OO+e7mpprAfPqkIXM=; b=Wt/ESUofCX4d5Ghfs4dv36c/knTCcHw6XkiBNRH6to3S6xqxTVWWGlfEp5DAz89ng4uF8x1j8gUzJAvLTc3r9xuF8ocl38biXH0QsrIg7ecm7AQkNfbah7SkA03kaMQ8tQfPBnHpahdHzjkyEbfYmJBP6YShhRokGusa3SPhlkl4E/HwtV9QUd9CW9XsicvuVbMbq9LPDRkc1z9XC5ah2iAWbKF+Y/uDLzQyGhbFOiE0prQFvEgtI11RyyPNPEawOktVsN9E13Xjg8tlWKWhZ+2Tu75PW13rK2kyyaVEfvxDvnIKJoj/7xS1ORiTCkLwmDegE5pAVhV0ZUWfm+hfNA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BrAhFqAjnWyqSBaTHOOKfwqYia9Ua++C44SAcV5lPnAseExDQTgLl4q32elATUNcLrlmLlMU2XQJ9XM5kR5doZ3LeWlFxsnUWFlShliJqkeHeJ6jAlqw2hN8CFqe5FnidfGlGGTq1cBx8hfbJdYmc8+S73eU+SI0/aXUqKroNo3k+52qKdAt+rQYK0iULra4HiG4vlEqoE9eTjV3WFbqONF0f2JfQxNrGvEWVfSu3LkprqYI1WtMeWHydanPZaz8xVZR6ui6h9dDQigbI1H9dTaW/FyvjRNtzSt7zz+y1yM8BarP1wX5sa9oMHNWRaKUT3Q01pDbBuNae/GSUsycTA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 10 Jul 2023 16:27:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.07.2023 16:12, Roger Pau Monne wrote:
> Commit 9473d9a24182 set the ASK mode without checking if there was a
> `vga` option provided in the command line.  This breaks existing
> behavior, so exit early without changes if `vga` is not present in the
> command line.
> 
> Fixes: 9473d9a24182 ('cmdline: parse multiple instances of the vga option')
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Should have spotted this during review; effectively you're (almost) undoing
part of the earlier change, just that ...

> --- a/xen/arch/x86/boot/cmdline.c
> +++ b/xen/arch/x86/boot/cmdline.c
> @@ -279,9 +279,13 @@ static void vga_parse(const char *cmdline, 
> early_boot_opts_t *ebo)
>  {
>      const char *c = cmdline;
>  
> +    c = find_opt(c, "vga=", true);

... you use c instead of cmdline here (and I'm heavily tempted to actually
make this the initializer of c).

Jan

> +    if ( !c )
> +        return;
> +
>      ebo->boot_vid_mode = ASK_VGA;
>  
> -    while ( (c = find_opt(c, "vga=", true)) != NULL )
> +    do
>      {
>          unsigned int tmp, vesa_depth, vesa_height, vesa_width;
>  
> @@ -332,6 +336,7 @@ static void vga_parse(const char *cmdline, 
> early_boot_opts_t *ebo)
>          else if ( !strmaxcmp(c, "ask", delim_chars_comma) )
>              ebo->boot_vid_mode = ASK_VGA;
>      }
> +    while ( (c = find_opt(c, "vga=", true)) != NULL );
>  }
>  #endif
>  




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.