Share

qemuctl

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

USB devices aren't listet properly

You are viewing a single message from this topic. View all messages.

  1. 2007-05-20 18:28:53 UTC
    *** /tmp/qemuctl0.2/qemuctl 2006-01-23 23:26:40.000000000 +0100
    --- /usr/bin/qemuctl 2007-05-20 20:23:06.000000000 +0200
    ***************
    *** 427,434 ****
    #$usbhostmenu = new Gtk2::Menu(); # Don't need to show menus
    $i=0;
    foreach( @temp ){
    ! if( $_=~/Class/ ){
    ! $_=~s/.+USB device (.+), (.+)/\1\*\2/;
    @tmp = split( /\*/, $_ );
    if( not $usbhostmenuitems[$i] ){
    $usbhostmenuitems[$i] = new Gtk2::MenuItem( $tmp[0]." -> ".$tmp[1] );
    --- 427,440 ----
    #$usbhostmenu = new Gtk2::Menu(); # Don't need to show menus
    $i=0;
    foreach( @temp ){
    ! if( $_=~/Class/ or $_=~/Vendor Specific/){
    ! # $_=~s/.+USB device (.+), (.+)/\1\*\2/;
    ! $_=~s/.+USB device (.+)/\1/;
    ! if ( not $_=~/(.+), (.+)/) {
    ! $_ =~s/(.+)./\1*\1\2/;
    ! } else {
    ! $_ =~s/(.+), (.+)/\1*\2/;
    ! }
    @tmp = split( /\*/, $_ );
    if( not $usbhostmenuitems[$i] ){
    $usbhostmenuitems[$i] = new Gtk2::MenuItem( $tmp[0]." -> ".$tmp[1] );
    ***************
    *** 468,474 ****
    $i=0;
    foreach( @temp ){
    if( $_=~/Device/ ){
    ! $_=~s/.+Device (.+), .+/\1/;
    if( not $usbmenuitems[$i] ){
    $usbmenuitems[$i] = new Gtk2::MenuItem( "Device ".$_ );
    $usbmenuitems[$i]->signal_connect( 'activate', usb_disconnect );
    --- 474,481 ----
    $i=0;
    foreach( @temp ){
    if( $_=~/Device/ ){
    ! # $_=~s/.+Device (.+), .+/\1/;
    ! $_=~s/.+Device (.+)\s*/\1/;
    if( not $usbmenuitems[$i] ){
    $usbmenuitems[$i] = new Gtk2::MenuItem( "Device ".$_ );
    $usbmenuitems[$i]->signal_connect( 'activate', usb_disconnect );
    ***************
    *** 655,661 ****

    sub usb_disconnect{
    $tmp = $_[0]->get_child()->get_label();
    ! $tmp =~s/Device (.+)/\1/;
    #print( "usb_del ".$tmp."\n" );
    sendcomand( "usb_del ".$tmp );
    }
    --- 662,668 ----

    sub usb_disconnect{
    $tmp = $_[0]->get_child()->get_label();
    ! $tmp =~s/Device ([0-9a-z]+\.[0-9a-z]+), .+/\1/;
    #print( "usb_del ".$tmp."\n" );
    sendcomand( "usb_del ".$tmp );
    }
< Previous | 1 | Next >

Add a Reply

You can use Markdown syntax in your reply.

Preview

Monitor this

Log in to monitor this topic. Not registered? Create an account to receive email updates when replies are posted to this topic. If you do not log in or register, your reply will be added anonymously.