From: Nathan F. <nf...@au...> - 2009-07-10 17:01:59
|
Applied. -Nathan Robert Jennings wrote: > The amsvis command will fail if vio devices have addresses greater than > 30000009 due to a problem with hexidecimal values attempting to be sorted > as long integers. This patch changes the sort to use string comparisions. > > Signed-off-by: Robert Jennings <rc...@li...> > > --- > scripts/amsvis/powerpcAMS/amswidget.py | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > Index: b/scripts/amsvis/powerpcAMS/amswidget.py > =================================================================== > --- a/scripts/amsvis/powerpcAMS/amswidget.py > +++ b/scripts/amsvis/powerpcAMS/amswidget.py > @@ -675,12 +675,12 @@ class device_data_widget(ams_widget): > def __cmp__(self, other): > """Compare device data widgets to other widgets (or anything). > > - The comparision is based on the nummerical name of the device, which > - is the bus address for the device. > + The comparision is based on the name of the device, which is the > + bus address for the device. > """ > - if (long(self.data[0]["name"])) < other: > + if self.data[0]["name"] < other: > return -1 > - elif (long(self.data[0]["name"])) > other: > + elif self.data[0]["name"] > other: > return 1 > else: > return 0 > |