* [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones.
@ 2014-05-09 9:59 Andrew Cooper
2014-05-12 12:33 ` Ian Campbell
2014-05-12 15:08 ` Ian Jackson
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Cooper @ 2014-05-09 9:59 UTC (permalink / raw)
To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell
For libxc users who log to syslog, this results in legible logging, rather
than long lines with #012's replacing newlines.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
tools/libxc/xc_hvm_build_x86.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c
index dd3b522..43103b9 100644
--- a/tools/libxc/xc_hvm_build_x86.c
+++ b/tools/libxc/xc_hvm_build_x86.c
@@ -283,15 +283,11 @@ static int setup_guest(xc_interface *xch,
goto error_out;
}
- DPRINTF("VIRTUAL MEMORY ARRANGEMENT:\n"
- " Loader: %016"PRIx64"->%016"PRIx64"\n"
- " Modules: %016"PRIx64"->%016"PRIx64"\n"
- " TOTAL: %016"PRIx64"->%016"PRIx64"\n"
- " ENTRY ADDRESS: %016"PRIx64"\n",
- elf.pstart, elf.pend,
- m_start, m_end,
- v_start, v_end,
- elf_uval(&elf, elf.ehdr, e_entry));
+ DPRINTF("VIRTUAL MEMORY ARRANGEMENT:\n");
+ DPRINTF(" Loader: %016"PRIx64"->%016"PRIx64"\n", elf.pstart, elf.pend);
+ DPRINTF(" Modules: %016"PRIx64"->%016"PRIx64"\n", m_start, m_end);
+ DPRINTF(" TOTAL: %016"PRIx64"->%016"PRIx64"\n", v_start, v_end);
+ DPRINTF(" ENTRY: %016"PRIx64"\n", elf_uval(&elf, elf.ehdr, e_entry));
if ( (page_array = malloc(nr_pages * sizeof(xen_pfn_t))) == NULL )
{
@@ -453,11 +449,10 @@ static int setup_guest(xc_interface *xch,
goto error_out;
}
- DPRINTF("PHYSICAL MEMORY ALLOCATION:\n"
- " 4KB PAGES: 0x%016lx\n"
- " 2MB PAGES: 0x%016lx\n"
- " 1GB PAGES: 0x%016lx\n",
- stat_normal_pages, stat_2mb_pages, stat_1gb_pages);
+ DPRINTF("PHYSICAL MEMORY ALLOCATION:\n");
+ DPRINTF(" 4KB PAGES: 0x%016lx\n", stat_normal_pages);
+ DPRINTF(" 2MB PAGES: 0x%016lx\n", stat_2mb_pages);
+ DPRINTF(" 1GB PAGES: 0x%016lx\n", stat_1gb_pages);
if ( loadelfimage(xch, &elf, dom, page_array) != 0 )
goto error_out;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones.
2014-05-09 9:59 [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones Andrew Cooper
@ 2014-05-12 12:33 ` Ian Campbell
2014-05-12 15:08 ` Ian Jackson
1 sibling, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2014-05-12 12:33 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Ian Jackson, Xen-devel
On Fri, 2014-05-09 at 10:59 +0100, Andrew Cooper wrote:
> For libxc users who log to syslog, this results in legible logging, rather
> than long lines with #012's replacing newlines.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked + applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones.
2014-05-09 9:59 [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones Andrew Cooper
2014-05-12 12:33 ` Ian Campbell
@ 2014-05-12 15:08 ` Ian Jackson
2014-05-12 15:18 ` Ian Campbell
1 sibling, 1 reply; 5+ messages in thread
From: Ian Jackson @ 2014-05-12 15:08 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Ian Campbell, Xen-devel
Andrew Cooper writes ("[PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones."):
> For libxc users who log to syslog, this results in legible logging, rather
> than long lines with #012's replacing newlines.
Thanks.
While you were there you should have removed the \n's. They are
redundant since xc_reportv was made to use xtl. Search for
"fmt_nonewline" in xc_private.c for the hideous hack...
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones.
2014-05-12 15:08 ` Ian Jackson
@ 2014-05-12 15:18 ` Ian Campbell
2014-05-12 15:39 ` Ian Jackson
0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2014-05-12 15:18 UTC (permalink / raw)
To: Ian Jackson; +Cc: Andrew Cooper, Xen-devel
On Mon, 2014-05-12 at 16:08 +0100, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones."):
> > For libxc users who log to syslog, this results in legible logging, rather
> > than long lines with #012's replacing newlines.
>
> Thanks.
>
> While you were there you should have
FYI I applied this one this morning.
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones.
2014-05-12 15:18 ` Ian Campbell
@ 2014-05-12 15:39 ` Ian Jackson
0 siblings, 0 replies; 5+ messages in thread
From: Ian Jackson @ 2014-05-12 15:39 UTC (permalink / raw)
To: Ian Campbell; +Cc: Andrew Cooper, Xen-devel
Ian Campbell writes ("Re: [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones."):
> On Mon, 2014-05-12 at 16:08 +0100, Ian Jackson wrote:
> > Andrew Cooper writes ("[PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones."):
> > > For libxc users who log to syslog, this results in legible logging, rather
> > > than long lines with #012's replacing newlines.
> >
> > Thanks.
> >
> > While you were there you should have
>
> FYI I applied this one this morning.
Indeed. No harm has been done, but the next time we tackle something
like this removing the extraneous newlines would be good.
Thanks,
Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-12 15:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09 9:59 [PATCH] tools/libxc: Issue individual DPRINTF()s rather than multiline ones Andrew Cooper
2014-05-12 12:33 ` Ian Campbell
2014-05-12 15:08 ` Ian Jackson
2014-05-12 15:18 ` Ian Campbell
2014-05-12 15:39 ` Ian Jackson
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).