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

Re: [PATCH v3 1/2] xen/console: introduce CONSOLE_PREFIX



On Fri, 6 Jun 2025, dmkhn@xxxxxxxxx wrote:
> From: Denis Mukhin <dmukhin@xxxxxxxx>
> 
> Add CONSOLE_PREFIX symbol to keep the prefix of the hypervisor's diagnostic
> messages.
> 
> No functional change.
> 
> Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx>

Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>


> ---
> Changes since v2:
> - n/a
> ---
>  xen/drivers/char/console.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> index e3731bf174..6e77b4af82 100644
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -61,6 +61,9 @@ enum {
>      CONSOLE_ALL             = CONSOLE_DEFAULT | CONSOLE_RING,
>  };
>  
> +/* Prefix for hypervisor's diagnostic console messages. */
> +#define CONSOLE_PREFIX      "(XEN) "
> +
>  static void console_send(const char *str, size_t len, unsigned int flags);
>  
>  /* console: comma-separated list of console outputs. */
> @@ -1017,7 +1020,7 @@ static void vprintk_common(const char *fmt, va_list 
> args, const char *prefix)
>  
>  void vprintk(const char *fmt, va_list args)
>  {
> -    vprintk_common(fmt, args, "(XEN) ");
> +    vprintk_common(fmt, args, CONSOLE_PREFIX);
>  }
>  
>  void printk(const char *fmt, ...)
> @@ -1288,7 +1291,7 @@ int __printk_ratelimit(int ratelimit_ms, int 
> ratelimit_burst)
>              snprintf(lost_str, sizeof(lost_str), "%d", lost);
>              /* console_lock may already be acquired by printk(). */
>              rspin_lock(&console_lock);
> -            printk_start_of_line("(XEN) ");
> +            printk_start_of_line(CONSOLE_PREFIX);
>              __putstr("printk: ");
>              __putstr(lost_str);
>              __putstr(" messages suppressed.\n");
> -- 
> 2.34.1
> 
> 



 


Rackspace

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