libxl: support soundhw for hvm domains
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 28 lines · Jim Fehlig
The xend driver and the parsing/formating code in src/xenconfig have long supported soundhw. Add support in the libxl driver too.
Signed-off-by Jim Fehlig <[email protected]>---
This patch continues the tradition of silently ignoring unsupported config in the libxl driver. But it is an improvement; post-patch only sound devices after the first are ignored :-).
src/libxl/libxl_conf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)src/libxl/libxl_conf.c +6
-0@@ -678,6 +678,19 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,libxl_defbool_set (&b_info->u.hvm.hpet,1 ); } } + +if (def->nsounds >0 ) { +/* +* Use first sound device. man xl.cfg(5) describes soundhw as +* a single device. From the man page: soundhw=DEVICE +*/
src/libxl/libxl_conf.c libxlMakeDomBuildInfo(virDomainDefPtr def, · line 696
Quoted 10 lines
src/libxl/libxl_conf.c +7
-0+virDomainSoundDefPtr snd = def->sounds[0 ]; + +if (VIR_STRDUP (b_info->u.hvm.soundhw, +virDomainSoundModelTypeToString (snd->model)) <0 ) +return -1 ; + } +for (i =0 ; i < def->os.nBootDevs; i++) {switch (def->os.bootDevs[i]) {case VIR_DOMAIN_BOOT_FLOPPY :
ACK
Michal
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 35 lines · Michal Privoznik
Quoted 33 lines · Jim Fehlig
The xend driver and the parsing/formating code in src/xenconfig have long supported soundhw. Add support in the libxl driver too.
Signed-off-by Jim Fehlig <[email protected]>---
This patch continues the tradition of silently ignoring unsupported config in the libxl driver. But it is an improvement; post-patch only sound devices after the first are ignored :-).
src/libxl/libxl_conf.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)src/libxl/libxl_conf.c +12
-0@@ -678,6 +678,19 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,libxl_defbool_set (&b_info->u.hvm.hpet,1 ); } } + +if (def->nsounds >0 ) { +/* +* Use first sound device. man xl.cfg(5) describes soundhw as +* a single device. From the man page: soundhw=DEVICE +*/ +virDomainSoundDefPtr snd = def->sounds[0 ]; + +if (VIR_STRDUP (b_info->u.hvm.soundhw, +virDomainSoundModelTypeToString (snd->model)) <0 ) +return -1 ; + }
Quoted 9 lines
src/libxl/libxl_conf.c libxlMakeDomBuildInfo(virDomainDefPtr def, · line 696
Quoted 6 lines
src/libxl/libxl_conf.c +1
-0+for (i =0 ; i < def->os.nBootDevs; i++) {switch (def->os.bootDevs[i]) {case VIR_DOMAIN_BOOT_FLOPPY :ACK
Thanks; pushed.
Regards,
Jim