Changeset 36246 in vbox for trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
- Timestamp:
- Mar 9, 2011 10:19:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r36107 r36246 3098 3098 3099 3099 def pciAddr(ctx,addr): 3100 str = "% d:%d.%d" %(addr >> 8, (addr & 0xff) >> 3, addr & 7)3100 str = "%02x:%02x.%d" %(addr >> 8, (addr & 0xff) >> 3, addr & 7) 3101 3101 return colPci(ctx, str) 3102 3102 … … 3116 3116 3117 3117 def parsePci(str): 3118 pcire = re.compile(r'(?P<b> \d+):(?P<d>\d+)\.(?P<f>\d)')3118 pcire = re.compile(r'(?P<b>[0-9a-fA-F]+):(?P<d>[0-9a-fA-F]+)\.(?P<f>\d)') 3119 3119 m = pcire.search(str) 3120 3120 if m is None: 3121 3121 return -1 3122 3122 dict = m.groupdict() 3123 return ((int(dict['b'] )) << 8) | ((int(dict['d'])) << 3) | int(dict['f'])3123 return ((int(dict['b'], 16)) << 8) | ((int(dict['d'], 16)) << 3) | int(dict['f']) 3124 3124 3125 3125 def lspciCmd(ctx, args):
Note:
See TracChangeset
for help on using the changeset viewer.