From d189767b0edbed45bb0e06f9c99f68e1da55f680 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Tue, 21 Jan 2014 11:29:13 -0500 Subject: [PATCH] VBOX: Fix the guest log parser --- samples/vboxwrapper/vbox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 5329a7b414..9f469ad520 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -1421,7 +1421,7 @@ void VBOX_VM::dumphypervisorlogs(bool include_error_logs) { line = prefiltered_guest_log.substr(eol_prev_pos, eol_pos - eol_prev_pos); if (line.find("Guest Log:") != string::npos) { - filtered_guest_log = line; + filtered_guest_log += line; } eol_prev_pos = eol_pos + 1; @@ -1430,7 +1430,7 @@ void VBOX_VM::dumphypervisorlogs(bool include_error_logs) { // Take the last 16k if (filtered_guest_log.size() >= 16384) { - local_guest_log = filtered_guest_log.substr(filtered_guest_log.size() - 16384, filtered_guest_log.size()); + local_guest_log = filtered_guest_log.substr(filtered_guest_log.size() - 16384, 16384); // Look for the next whole line of text. iter = local_guest_log.begin(); @@ -1459,6 +1459,7 @@ void VBOX_VM::dumphypervisorlogs(bool include_error_logs) { if (include_error_logs) { fprintf( stderr, + "\n" " Hypervisor System Log:\n\n" "%s\n" " VM Execution Log:\n\n"