The problem of the bug was caused by bit of a libgtop patch in gnome2-22 
wasn't ported to gnome-2-24 branch when the revision of the tarball was 
upreved. Thanks to William Roache who highlighted the missing function.
Readded the patch below to patches/libgtop-01-solaris.diff


Index: patches/libgtop-01-solaris.diff
===================================================================
--- patches/libgtop-01-solaris.diff    (revision 17585)
+++ patches/libgtop-01-solaris.diff    (working copy)
+diff -urN libgtop-2.25.91/sysdeps/common/fsusage.c 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/common/fsusage.c
+--- libgtop-2.25.91/sysdeps/common/fsusage.c    2008-05-23 
22:13:22.000000000 +0000
++++ 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/common/fsusage.c    
2009-02-25 17:25:57.183257000 +0000
+@@ -149,6 +149,15 @@
+ #define _glibtop_get_fsusage_read_write(S, B, P) \
+     _glibtop_freebsd_get_fsusage_read_write(S, B, P)
 
++#elif (defined(sun) || defined(__sun))
++G_GNUC_INTERNAL void
++_glibtop_sun_get_fsusage_read_write(glibtop *server,
++                    glibtop_fsusage *buf,
++                    const char *path);
++
++#define _glibtop_get_fsusage_read_write(S, B, P) \
++    _glibtop_sun_get_fsusage_read_write(S, B, P)
++
+ #else /* default fallback */
+ #warning glibtop_get_fsusage .read .write are not implemented.
+ static inline void


+diff -urN libgtop-2.25.91/sysdeps/solaris/Makefile.am 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/solaris/Makefile.am
+--- libgtop-2.25.91/sysdeps/solaris/Makefile.am    2008-05-23 
22:13:24.000000000 +0000
++++ 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/solaris/Makefile.am    
2009-02-25 17:27:23.462319000 +0000
+@@ -8,7 +8,8 @@
+                   proclist.c procstate.c procuid.c \
                    proctime.c procmem.c procsignal.c \
                    prockernel.c procsegment.c procargs.c \
-                   procopenfiles.c \
-+                                  sysinfo.c procwd.c glibtop_private.c 
procaffinity.c \
+-                  procopenfiles.c \
++                  procopenfiles.c sysinfo.c fsusage.c procwd.c \
++                  glibtop_private.c procaffinity.c \
                    procmap.c netload.c ppp.c procdata.c netlist.c
 
  libgtop_sysdeps_2_0_la_LDFLAGS    = $(LT_VERSION_INFO)
+diff -urN libgtop-2.25.91/sysdeps/solaris/fsusage.c 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/solaris/fsusage.c
+--- libgtop-2.25.91/sysdeps/solaris/fsusage.c    1970-01-01 
00:00:00.000000000 +0000
++++ 
../SUNWlibgtop-2.25.91.hacked/libgtop-2.25.91/sysdeps/solaris/fsusage.c    
2009-02-25 17:20:33.608888000 +0000
+@@ -0,0 +1,99 @@
++#include <config.h>
++#include <glibtop.h>
++#include <glibtop/error.h>
++#include <glibtop/fsusage.h>
++#include <glibtop/union.h>
++
++#include "glibtop_private.h"
++
++#include <glib.h>
++
++#include <unistd.h>
++#include <kstat.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/statvfs.h>
++
++#include <stdio.h>
++#include <string.h>
++#include <stdlib.h>
++
++G_GNUC_INTERNAL void
++_glibtop_sun_get_fsusage_read_write(glibtop *server,
++                      glibtop_fsusage *buf,
++                      const char *path)
++{
++        struct statvfs64       statvfsbuf;
++        char            ksname[KSTAT_STRLEN + 1];
++        kstat_ctl_t * const kctl = server->machine.kc;
++    kstat_t        *ksp;
++         kstat_io_t         kio;
++    kstat_named_t   *kread, *kwrite;
++    int i;
++   
++        /*
++         *  get a kstat handle and update the user's kstat chain
++         */
++        if( kctl == NULL ){
++                glibtop_warn_io_r (server, "kstat_open ()");
++                return;
++        }
++   
++        /* make sure we have current data */ 
++    while( kstat_chain_update( kctl ) != 0 )
++                ;
++       
++         for (ksp = kctl->kc_chain, i =0; ksp != NULL; ksp = 
ksp->ks_next, i++) { 
++        if (ksp->ks_type == KSTAT_TYPE_IO && 
strcmp(ksp->ks_class,"disk") == 0) {
++                      kstat_read(kctl, ksp, &kio); 
++                       buf->read +=  kio.nread;      
++            buf->write +=  kio.nwritten;
++        } 
++    }
++#if 0
++    /* these codes keep here, because they are a good way to get the
++       fsusage information, but at the moment, the interfaces used
++       are not public or stable. so let's use them when public...
++      */
++        /*
++         *  get a kstat handle and update the user's kstat chain
++         */
++        if( kctl == NULL ){
++                glibtop_warn_io_r (server, "kstat_open ()");
++                return;
++        }
++      
++    while( kstat_chain_update( kctl ) != 0 )
++                ;
++
++    if (statvfs64(path, &statvfsbuf) != 0) {
++                glibtop_warn_io_r (server, "kstat_open ()");
++        return;
++    }       
++    snprintf(ksname, KSTAT_STRLEN, "%s%lx", VOPSTATS_STR,
++                            statvfsbuf.f_fsid);
++
++           /*
++         *  traverse the kstat chain
++         *  to find the appropriate statistics
++         */
++        if( (ksp = kstat_lookup( kctl,
++                       "unix", 0, ksname )) == NULL ) {
++                   return;
++        }
++        if( kstat_read( kctl, ksp, NULL ) == -1 ) {
++                   return;
++        }
++
++    kread = (kstat_named_t *)kstat_data_lookup(ksp,"read_bytes");
++        if( kread != NULL ) {
++                   buf->read = kread->value.ull;
++        }
++
++        kwrite = (kstat_named_t *)kstat_data_lookup(ksp,"write_bytes");
++        if( kwrite != NULL ) {
++                   buf->write = kwrite->value.ull;
++        }
++#endif
++        buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << 
GLIBTOP_FSUSAGE_WRITE);
++}
+


Reply via email to