Commit 6052f659 authored by Mike Hibler's avatar Mike Hibler
Browse files

Start capture with the right PTY when doing HVM (e.g., FreeBSD).

Follow the default behavior of "xl console" which defaults to using
the virtual uart device when in HVM. You can use a PV console in HVM
mode, but FreeBSD doesn't. We will cross this bridge when we encounter it.
parent 491d0bef
...@@ -302,8 +302,21 @@ sub Online() ...@@ -302,8 +302,21 @@ sub Online()
# Start a capture for the serial console. # Start a capture for the serial console.
if (-e "$CAPTURE") { if (-e "$CAPTURE") {
my $tty = `xenstore-read /local/domain/$domid/console/tty`; my $tty;
if (! $?) {
#
# XXX HVMs can use an emulated UART as their console.
# Check for that.
#
if (!mysystem2("xenstore-read /local/domain/$domid/hvmloader >/dev/null 2>&1")) {
$tty = `xenstore-read /local/domain/$domid/serial/0/tty 2>/dev/null`;
$tty = undef if ($?);
}
if (!$tty) {
$tty = `xenstore-read /local/domain/$domid/console/tty 2>/dev/null`;
$tty = undef if ($?);
}
if ($tty) {
chomp($tty); chomp($tty);
$tty =~ s,\/dev\/,,; $tty =~ s,\/dev\/,,;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment