xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>
Cc: Keir Fraser <keir.xen@gmail.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen: print "debug=y|n" during hypervisor startup
Date: Wed, 30 Jan 2013 12:35:49 +0000	[thread overview]
Message-ID: <510913A5.6030205@citrix.com> (raw)
In-Reply-To: <5780ba9c6c21a6acbdf5.1359548942@Solace>

On 30/01/13 12:29, Dario Faggioli wrote:
> So that we can easily figure out whether or not we are running a
> debug build of Xen (e.g., via `xl dmesg').
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
>
> diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -577,6 +577,11 @@ void __init console_init_preirq(void)
>  {
>      char *p;
>      int sh;
> +    char debug = 'n';
> +
> +#ifndef NDEBUG
> +    debug = 'y';
> +#endif

While the compiler should certainly do the right thing,


#ifndef NDEBUG
char debug = 'y';
#else
char debug = 'n';
#endif

is arguably neater.

~Andrew

>  
>      serial_init_preirq();
>  
> @@ -608,9 +613,9 @@ void __init console_init_preirq(void)
>      spin_lock(&console_lock);
>      __putstr(xen_banner());
>      spin_unlock(&console_lock);
> -    printk("Xen version %d.%d%s (%s@%s) (%s) %s\n",
> +    printk("Xen version %d.%d%s (%s@%s debug=%c) (%s) %s\n",
>             xen_major_version(), xen_minor_version(), xen_extra_version(),
> -           xen_compile_by(), xen_compile_domain(),
> +           xen_compile_by(), xen_compile_domain(), debug,
>             xen_compiler(), xen_compile_date());
>      printk("Latest ChangeSet: %s\n", xen_changeset());
>  
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2013-01-30 12:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 12:29 [PATCH] xen: print "debug=y|n" during hypervisor startup Dario Faggioli
2013-01-30 12:35 ` Andrew Cooper [this message]
2013-01-30 13:51 ` Keir Fraser
2013-01-30 14:18   ` Dario Faggioli

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=510913A5.6030205@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=keir.xen@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /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;
as well as URLs for NNTP newsgroup(s).