@@ -642,14 +642,19 @@ def parse_args():
642642 devg .add_option ("" , "--host-device" , type = "string" , dest = "hostdevs" ,
643643 action = "callback" , callback = cli .check_before_append ,
644644 help = _ ("Physical host device to attach to the domain." ))
645- devg .add_option ("" , "--sound" , action = "store_true" , dest = "sound" ,
646- default = False , help = _ ("Use sound device emulation" ))
645+ devg .add_option ("" , "--soundhw" , type = 'string' , action = "callback" ,
646+ callback = cli .check_before_append , dest = "soundhw" ,
647+ help = _ ("Use sound device emulation" ))
647648 devg .add_option ("" , "--watchdog" , type = "string" , dest = "watchdog" ,
648649 action = "callback" , callback = cli .check_before_append ,
649650 help = _ ("Add a watchdog device to the domain." ))
650651 devg .add_option ("" , "--video" , dest = "video" , type = "string" ,
651652 action = "callback" , callback = cli .check_before_append ,
652653 help = _ ("Specify video hardware type." ))
654+
655+ # Deprecated
656+ devg .add_option ("" , "--sound" , action = "store_true" , dest = "sound" ,
657+ default = False , help = optparse .SUPPRESS_HELP )
653658 parser .add_option_group (devg )
654659
655660 virg = OptionGroup (parser , _ ("Virtualization Platform Options" ))
@@ -787,7 +792,7 @@ def main():
787792 cli .get_cpuset (options .cpuset , guest .memory , guest , conn )
788793 if ishvm :
789794 get_watchdog (options .watchdog , guest )
790- cli .get_sound (options .sound , guest )
795+ cli .get_sound (options .sound , options . soundhw , guest )
791796 get_chardevs (VirtualDevice .VIRTUAL_DEV_SERIAL , options .serials , guest )
792797 get_chardevs (VirtualDevice .VIRTUAL_DEV_PARALLEL , options .parallels ,
793798 guest )
0 commit comments