From: Robert J. <rc...@li...> - 2009-07-01 15:53:16
|
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 -- |
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 > |
From: Brian K. <br...@li...> - 2010-01-13 22:14:59
|
Nathan, When I do a fresh pull from git, I don't see this patch applied. Can you apply this and push it out? Thanks, Brian On 07/10/2009 11:31 AM, Nathan Fontenot wrote: > 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 >> > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Powerpc-utils-devel mailing list > Pow...@li... > https://lists.sourceforge.net/lists/listinfo/powerpc-utils-devel -- Brian King Linux on Power Virtualization IBM Linux Technology Center |