Changeset 926

Show
Ignore:
Timestamp:
03/10/08 07:09:23 (13 years ago)
Author:
ppalmers
Message:

fix some more small bugs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/support/tools/listirqinfo.py

    r921 r926  
    6666(exitstatus, outtext) = commands.getstatusoutput('ps -eLo pid,cmd,class,rtprio | grep IRQ') 
    6767 
    68 rawstr = r"""([0-9]+) +\[IRQ-([0-9]+)\] +([A-Z]{2}) +([0-9]+)""" 
     68rawstr = r"""([0-9]+) +\[IRQ-([0-9]+)\] +([A-Z]{2}) +([-0-9]+)""" 
    6969compile_obj = re.compile(rawstr) 
    7070 
     
    7777                irq.number = int(match_obj.group(2)) 
    7878                irq.scheduling_class = match_obj.group(3) 
    79                 irq.scheduling_priority = int(match_obj.group(4)) 
     79                if match_obj.group(4) != '-': 
     80                        irq.scheduling_priority = int(match_obj.group(4)) 
     81                else: 
     82                        irq.scheduling_priority = None 
    8083                IRQs[irq.number] = irq 
    8184 
    8285(exitstatus, outtext) = commands.getstatusoutput('ps -eLo pid,cmd,class,rtprio | grep softirq') 
    8386 
    84 rawstr = r"""([0-9]+) +\[softirq-(.*)\] +([A-Z]{2}) +([0-9]+)""" 
     87rawstr = r"""([0-9]+) +\[softirq-(.*)\] +([A-Z]+) +([-0-9]+)""" 
    8588compile_obj = re.compile(rawstr) 
    8689 
     
    9497                irq.fullname = "softirq-%s" % match_obj.group(2) 
    9598                irq.scheduling_class = match_obj.group(3) 
    96                 irq.scheduling_priority = int(match_obj.group(4)) 
     99                if match_obj.group(4) != '-': 
     100                        irq.scheduling_priority = int(match_obj.group(4)) 
     101                else: 
     102                        irq.scheduling_priority = None 
    97103                softIRQs[irq.name] = irq 
    98104