Show
Ignore:
Timestamp:
10/12/09 13:34:30 (3 years ago)
Author:
arnonym
Message:

Backport the changes to ffado-diag to better detect the firewire stack.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/support/tools/ffado-diag.in

    r1665 r1686  
    7878    oldstack_present = check_1394oldstack_present() 
    7979    oldstack_loaded = check_1394oldstack_loaded() 
     80    oldstack_active = check_1394oldstack_active() 
     81    oldstack_statically_linked = not check_1394oldstack_loaded() and check_1394oldstack_linked() 
    8082    newstack_present = check_1394newstack_present() 
    8183    newstack_loaded = check_1394newstack_loaded() 
     84    newstack_active = check_1394newstack_active() 
     85    newstack_statically_linked = not check_1394newstack_loaded() and check_1394newstack_linked() 
    8286     
    8387    print "  old 1394 stack present.... " + str(oldstack_present) 
    8488    print "  old 1394 stack loaded..... " + str(oldstack_loaded) 
     89    print "  old 1394 stack active..... " + str(oldstack_active) 
    8590    print "  new 1394 stack present.... " + str(newstack_present) 
    8691    print "  new 1394 stack loaded..... " + str(newstack_loaded) 
     92    print "  new 1394 stack active..... " + str(newstack_active) 
    8793     
    8894    # check /dev/raw1394 node presence 
     
    148154    # do the interpretation of the tests 
    149155    print "FireWire kernel drivers:" 
    150     ## FIXME: what about in-kernel firewire? (i.e. no modules) 
    151     if not oldstack_present: 
     156    if (oldstack_loaded or oldstack_statically_linked) and \ 
     157       (newstack_loaded or newstack_statically_linked): 
     158        help.show('MODULES_BOTH_STACKS_LOADED') 
     159        sys.exit(-1) 
     160    elif newstack_loaded or newstack_statically_linked: 
     161        help.show('MODULES_NEW_STACK_LOADED') 
     162        sys.exit(-1) 
     163    elif oldstack_statically_linked: 
     164        print "[PASS] Kernel drivers statically linked into the kernel." 
     165    elif not oldstack_present: 
    152166        help.show('MODULES_OLD_STACK_NOT_INSTALLED') 
    153167        sys.exit(-1) 
     168    elif not oldstack_loaded: 
     169        help.show('MODULES_OLD_STACK_NOT_LOADED') 
     170        sys.exit(-1) 
    154171    else: 
    155         if newstack_loaded and oldstack_loaded: 
    156             help.show('MODULES_BOTH_STACKS_LOADED') 
    157             sys.exit(-1) 
    158         elif newstack_loaded: 
    159             help.show('MODULES_NEW_STACK_LOADED') 
    160             sys.exit(-1) 
    161         elif not oldstack_loaded: 
    162             help.show('MODULES_OLD_STACK_NOT_LOADED') 
    163             sys.exit(-1) 
    164         else: 
    165             print "[PASS] Kernel modules present and correctly loaded." 
     172        print "[PASS] Kernel modules present and correctly loaded." 
    166173 
    167174    if not devnode_present: