[libvirt] [PATCH 2/3] Extract the assigned pty device for channels

2009-12-10 Thread Matthew Booth
* src/qemu/qemu_driver.c: Parse pty devices for channels
---
 src/qemu/qemu_driver.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2fb059d..c1feb0f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1439,6 +1439,16 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
 }
 }
 
+/* then the channel devices */
+for (i = 0 ; i  vm-def-nchannels ; i++) {
+virDomainChrDefPtr chr = vm-def-channels[i];
+if (chr-type == VIR_DOMAIN_CHR_TYPE_PTY) {
+if ((ret = qemudExtractTTYPath(conn, output, offset,
+   chr-data.file.path)) != 0)
+return ret;
+}
+}
+
 return 0;
 }
 
-- 
1.6.5.2

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 2/3] Extract the assigned pty device for channels

2009-11-25 Thread Daniel P. Berrange
On Mon, Nov 23, 2009 at 12:30:28PM +, Matthew Booth wrote:
 * src/qemu/qemu_driver.c: Parse pty devices for channels
 ---
  src/qemu/qemu_driver.c |   10 ++
  1 files changed, 10 insertions(+), 0 deletions(-)
 
 diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
 index 2c5086b..ebf44b0 100644
 --- a/src/qemu/qemu_driver.c
 +++ b/src/qemu/qemu_driver.c
 @@ -1271,6 +1271,16 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
  }
  }
  
 +/* then the channel devices */
 +for (i = 0 ; i  vm-def-nchannels ; i++) {
 +virDomainChrDefPtr chr = vm-def-channels[i];
 +if (chr-type == VIR_DOMAIN_CHR_TYPE_PTY) {
 +if ((ret = qemudExtractTTYPath(conn, output, offset,
 +   chr-data.file.path)) != 0)
 +return ret;
 +}
 +}
 +
  return 0;
  }
  
 -- 


ACK,


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH 2/3] Extract the assigned pty device for channels

2009-11-23 Thread Matthew Booth
* src/qemu/qemu_driver.c: Parse pty devices for channels
---
 src/qemu/qemu_driver.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2c5086b..ebf44b0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1271,6 +1271,16 @@ qemudFindCharDevicePTYs(virConnectPtr conn,
 }
 }
 
+/* then the channel devices */
+for (i = 0 ; i  vm-def-nchannels ; i++) {
+virDomainChrDefPtr chr = vm-def-channels[i];
+if (chr-type == VIR_DOMAIN_CHR_TYPE_PTY) {
+if ((ret = qemudExtractTTYPath(conn, output, offset,
+   chr-data.file.path)) != 0)
+return ret;
+}
+}
+
 return 0;
 }
 
-- 
1.6.5.2

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list