9679N/A--- gnome-applets-2.17.1/multiload/linux-proc.c 2006-12-31 10:07:39.000000000 +0800
9679N/A+++ gnome-applets-2.17.1.mod/multiload/linux-proc.c 2007-01-09 19:15:24.881474000 +0800
8923N/A@@ -115,6 +115,13 @@ GetDiskLoad (int Maximum, int data [3],
8923N/A
8923N/A read = write = 0;
8695N/A
8923N/A+
8923N/A+ /*
8923N/A+ At the moment, Solaris can't get the read/write information for filesystem
8923N/A+ so we would like to use disk to get them, later when some unstable interfaces
8923N/A+ become statble or public, will use them
8923N/A+ */
8923N/A+ /*
8923N/A mountentries = glibtop_get_mountlist (&mountlist, FALSE);
8695N/A
8923N/A for (i = 0; i < mountlist.number; i++)
8923N/A@@ -131,6 +138,10 @@ GetDiskLoad (int Maximum, int data [3],
8923N/A }
8923N/A
8923N/A g_free(mountentries);
8923N/A+ */
8923N/A+ glibtop_fsusage fsusage;
8923N/A+ glibtop_get_fsusage(&fsusage,"/"); /* "/" will not use, just as a input */
8923N/A+ read = fsusage.read; write = fsusage.write;
8695N/A
8923N/A readdiff = read - lastread;
8923N/A writediff = write - lastwrite;
8923N/A@@ -300,7 +311,7 @@ GetNet (int Maximum, int data [5], LoadG
8923N/A autoscaler_init(&scaler, 60, 501);
8923N/A }
8923N/A
8923N/A-
8923N/A+ netlist.flags = 1;
8923N/A devices = glibtop_get_netlist(&netlist);
8923N/A
8923N/A for(i = 0; i < netlist.number; ++i)
9679N/A@@ -310,7 +321,12 @@ GetNet (int Maximum, int data [5], LoadG
9679N/A
9679N/A glibtop_get_netload(&netload, devices[i]);
9679N/A
9679N/A- g_return_if_fail((netload.flags & needed_netload_flags) == needed_netload_flags);
9679N/A+ /* this is not correct, because after run get netlist, there are lots of net devices,
9679N/A+ not all of them meet the requirement of needed_netload_flags, but we don't need to
9679N/A+ exit, we can just ignore them, and try to continue with the next one */
9679N/A+ if ((netload.flags & needed_netload_flags) != needed_netload_flags)
9679N/A+ continue;
9679N/A+
9679N/A
9679N/A if (!(netload.if_flags & (1L << GLIBTOP_IF_FLAGS_UP)))
9679N/A continue;