On Wed, 2009-03-25 at 09:45 +0000, Ghee Teo wrote:
> On 03/24/09 20:52, Laszlo (Laca) Peter wrote: 
> > Brian,
> > 
> > This is in a Solaris-specific file (sysdeps/solaris/netload.c)
> > so there is no need to #ifdef __sun.
> > I guess the question is if it works on s10.
> >   
> s10? Why? The patch is for vermillion.

Because you might want to upstream the patch.

Laca

> -Ghee (a bit puzzled)
> > Could someone verify?
> > 
> > Laca
> > 
> > On Tue, 2009-03-24 at 15:46 -0500, Brian Cameron wrote:
> >   
> > > Andras:
> > > 
> > >     
> > > > it comes from kstat's link "module"
> > > > 
> > > > try:
> > > > kstat -m link
> > > > 
> > > > it reports only the ethernet interface(s)' stats
> > > >       
> > > If the need to change name to "link" is Solaris specific, shouldn't
> > > this code change be "#ifdef __sun" or something so the change could
> > > go upstream?
> > > 
> > > Brian
> > > 
> > > 
> > >     
> > > > On Tue, Mar 24, 2009 at 9:39 PM, Brian Cameron<Brian.Cameron at 
> > > > sun.com>  wrote:
> > > >       
> > > > > Andras:
> > > > > 
> > > > >         
> > > > > > > +diff -Naur libgtop-2.26.0.old/sysdeps/solaris/netload.c
> > > > > > > libgtop-2.26.0/sysdeps/solaris/netload.c
> > > > > > > +--- libgtop-2.26.0.old/sysdeps/solaris/netload.c    2009-03-23
> > > > > > > 20:02:34.031743396 +0200
> > > > > > > ++++ libgtop-2.26.0/sysdeps/solaris/netload.c    2009-03-23
> > > > > > > 20:00:36.697284713 +0200
> > > > > > > +@@ -182,7 +182,7 @@
> > > > > > > +     /*
> > > > > > > +      *  chop off the trailing interface
> > > > > > > +      */
> > > > > > > +-    module = strdup( name );
> > > > > > > ++    module = strdup( "link" );
> > > > > > > +     ptr = module + strlen( module ) - 1;
> > > > > > > +     while( (ptr>    module)&&    isdigit( (int) *ptr ) ) {
> > > > > > > +         *ptr = '\0';
> > > > > > > +
> > > > > > > 
> > > > > > > Why is this one required?
> > > > > > >             
> > > > > > take a look at the code:
> > > > > >         if( (ksp = kstat_lookup( kctl,
> > > > > >                         module, 0, name )) == NULL ) {
> > > > > > 
> > > > > > if you have let's say hme0:
> > > > > > module = hme
> > > > > > name = hme0
> > > > > > which is correct, but let's say if you rename it...
> > > > > > module = rename
> > > > > > name = rename0
> > > > > > which of course will fail...
> > > > > > of course you can ask why it doesnt use the "output" from the
> > > > > > netlist... dont ask me
> > > > > >           
> > > > > I don't understand how this relates to changing name to "link" in
> > > > > the netload.c file.  Could you explain?
> > > > > 
> > > > > Brian
> > > > > 
> > > > >         
> > > > 
> > > >       
> > 
> >   
> 


Reply via email to