[Goodies-dev] [Bug 4228] New: Fixes for OpenBSD support

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Tue Jul 15 14:24:26 CEST 2008


DO NOT REPLY TO THIS EMAIL.  Also, do not reply via email to the person
whose email is mentioned below.  To comment on this bug, please visit:
http://bugzilla.xfce.org/show_bug.cgi?id=4228

           Summary: Fixes for OpenBSD support
           Product: Xfce Panel Plugins
           Version: unspecified
          Platform: PC (x86)
        OS/Version: OpenBSD
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: cpugraph
        AssignedTo: goodies-dev at xfce.org
        ReportedBy: landry at fr.homeunix.org


This patch is against 0.3.0, but applies (with manual tweaks) to trunk too :

--- panel-plugin/os.c.orig      Tue Jul 15 14:10:04 2008
+++ panel-plugin/os.c   Tue Jul 15 14:11:46 2008
@@ -101,12 +101,12 @@ long GetCPUUsage (int *oldusage, int *oldtotal)

        return usage;
 }
-#elif defined (__OpenBSD_)
+#elif defined (__OpenBSD__)
 long GetCPUUsage (int *oldusage, int *oldtotal)
 {
         long user, nice, sys, bsdidle, idle;
          long used, total, usage;
-         static int mib[] = {CTL_KERN, KERN_CP_TIME };
+         static int mib[] = {CTL_KERN, KERN_CPTIME };
          u_int64_t cp_time[CPUSTATES];
          size_t len = sizeof (cp_time);
          if (sysctl (mib, 2, &cp_time, &len, NULL, 0) < 0)
@@ -134,5 +134,5 @@ long GetCPUUsage (int *oldusage, int *oldtotal)
         return usage;  
 }
 #else
-#error "You're OS is not supported."
+#error "Your OS is not supported."
 #endif

Awaiting next release, with full *BSD support (not like 0.4.0 :)


-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Goodies-dev mailing list