From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] xen: print "debug=y|n" during hypervisor startup Date: Wed, 30 Jan 2013 12:35:49 +0000 Message-ID: <510913A5.6030205@citrix.com> References: <5780ba9c6c21a6acbdf5.1359548942@Solace> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5780ba9c6c21a6acbdf5.1359548942@Solace> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: Keir Fraser , Ian Campbell , xen-devel List-Id: xen-devel@lists.xenproject.org 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 > > 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