release can be found at http://library.gnome.org/misc/release-notes/2.30/ . This release brings initial PackageKit support, Upower (replaces power management part of hal), cuse4bsd integration with HAL and cheese, and a faster Evolution. Sadly GNOME 2.30.x will be the last release with FreeBSD 6.X support. This will also be the last of the 2.x releases. The next release will be the highly-anticipated GNOME 3.0 which will bring with it a new UI experience. Currently, there are a few bugs with GNOME 2.30 that may be of note for our users. Be sure to consult the UPGRADING note or the 2.30 upgrade FAQ at http://www.freebsd.org/gnome/docs/faq230.html for specific upgrading instructions, and the up-to-date list of known issues. This release features commits by avl, ahze, bland, marcus, mezz, and myself. The FreeBSD GNOME Team would like to thank Anders F Bjorklund for doing the initual packagekit porting. And the following contributors & testers for there help with this release: Eric L. Chen Vladimir Grebenschikov Sergio de Almeida Lenzi DomiX walder crsd Kevin Oberman Michal Varga Pavel Plesov Bapt kevin and ITetcu for two exp-run PR: ports/143852 ports/145347 ports/144980 ports/145830 ports/145511
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
--- src/gpm-load.c.orig 2010-01-01 23:29:11.000000000 -0500
|
|
+++ src/gpm-load.c 2010-01-01 23:46:31.000000000 -0500
|
|
@@ -33,6 +33,10 @@
|
|
#include <kstat.h>
|
|
#include <sys/sysinfo.h>
|
|
#endif
|
|
+#if defined(__FreeBSD__)
|
|
+#include <sys/resource.h>
|
|
+#include <sys/sysctl.h>
|
|
+#endif
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif /* HAVE_UNISTD_H */
|
|
@@ -151,6 +155,32 @@ out:
|
|
return FALSE;
|
|
}
|
|
|
|
+#elif defined(__FreeBSD__)
|
|
+
|
|
+/**
|
|
+ * gpm_load_get_cpu_values:
|
|
+ * @cpu_idle: The idle time reported by the CPU
|
|
+ * @cpu_total: The total time reported by the CPU
|
|
+ * Return value: Success of reading of the kern.cp_time sysctl.
|
|
+ **/
|
|
+static gboolean
|
|
+gpm_load_get_cpu_values (long unsigned *cpu_idle, long unsigned *cpu_total)
|
|
+{
|
|
+ long cpts[CPUSTATES];
|
|
+ size_t length;
|
|
+
|
|
+ length = sizeof (cpts);
|
|
+ if (sysctlbyname ("kern.cp_time", cpts, &length, NULL, 0)) {
|
|
+ return FALSE;
|
|
+ }
|
|
+
|
|
+ *cpu_idle = (unsigned long) cpts[CP_IDLE];
|
|
+ *cpu_total = (unsigned long) (cpts[CP_USER] + cpts[CP_NICE] + \
|
|
+ cpts[CP_SYS] + cpts[CP_IDLE] + cpts[CP_INTR]);
|
|
+
|
|
+ return TRUE;
|
|
+}
|
|
+
|
|
#else
|
|
|
|
/**
|
|
@@ -192,7 +222,7 @@ gpm_load_get_cpu_values (long unsigned *
|
|
*cpu_total = cpu_user + cpu_nice + cpu_system + *cpu_idle;
|
|
ret = TRUE;
|
|
out:
|
|
- if (!fd)
|
|
+ if (fd)
|
|
fclose (fd);
|
|
return ret;
|
|
}
|