1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-23 19:39:06 +00:00

applied submitted patches for get_ibm_acpi_volume bug,

realtime clock bug and kFreeBSD support (thanks KPH).


git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@993 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Philip Kovacs 2007-12-31 00:00:35 +00:00
parent 0c100ee072
commit 651be79121
8 changed files with 30 additions and 18 deletions

View File

@ -143,8 +143,10 @@ J
Some cleaning and commenting apparently :)
SIGHUP config file reload
Kapil Hari Paranjape
Kapil Hari Paranjape <kapil@imsc.res.in>
ibm_volume patch
kFreeBSD support patch
realtime clock patck
killfire
fs_used_perc and fs_bar_free patch

View File

@ -1,5 +1,12 @@
# $Id$
2007-12-31
* Applied submitted patches:
1) to suport Debian's kFreeBSD;
2) to use realtime clock in timed threads and
3) to fix get_ibm_acpi_volume zero value bug
(thanks Kapil Hari Paranjape).
2007-11-22
* Conky 1.4.9 released.

View File

@ -2,9 +2,9 @@ dnl $Id$
dnl major, minor and micro version macros.
m4_define([conky_version_major], [1])
m4_define([conky_version_minor], [4])
m4_define([conky_version_micro], [9])
m4_define([conky_version_tag], []) dnl [] for releases
m4_define([conky_version_minor], [5])
m4_define([conky_version_micro], [0])
m4_define([conky_version_tag], [svn]) dnl [] for releases
m4_define([conky_version_revision],[r@REVISION@])
m4_define([conky_version],
[conky_version_major().conky_version_minor().conky_version_micro()ifelse(
@ -51,7 +51,7 @@ case $uname in
Linux*)
WANT_SYSINFO=yes
;;
FreeBSD*)
FreeBSD*|GNU/kFreeBSD*)
WANT_KVM=yes
WANT_DEVSTAT=yes
;;
@ -79,7 +79,7 @@ esac
AM_CONDITIONAL(BUILD_LINUX, test x$uname = xLinux)
#AM_CONDITIONAL(BUILD_SOLARIS, test x$uname = xSunOS)
AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD)
AM_CONDITIONAL(BUILD_FREEBSD, test x$uname = xFreeBSD -o x$uname = xGNU/kFreeBSD)
#AM_CONDITIONAL(BUILD_NETBSD, test x$uname = xNetBSD)
AM_CONDITIONAL(BUILD_OPENBSD, test x$uname = xOpenBSD)

View File

@ -1058,7 +1058,7 @@ enum text_object_type {
OBJ_pop3,
OBJ_pop3_unseen,
OBJ_pop3_used,
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
OBJ_apm_adapter,
OBJ_apm_battery_time,
OBJ_apm_battery_life,
@ -3122,7 +3122,7 @@ static struct text_object *construct_text_object(const char *s, const char *arg,
#ifndef __OpenBSD__
OBJ(adt746xcpu, 0) END OBJ(adt746xfan, 0) END
#endif /* !__OpenBSD__ */
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
OBJ(apm_adapter, 0) END
OBJ(apm_battery_life, 0) END
OBJ(apm_battery_time, 0) END
@ -4966,7 +4966,7 @@ static void generate_text_internal(char *p, int p_max_size, struct text_object *
format_seconds(p, p_max_size, (int) cur->uptime);
}
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
OBJ(apm_adapter) {
char *msg;
msg = get_apm_adapter();
@ -7773,7 +7773,7 @@ int main(int argc, char **argv)
optind = 0;
#endif
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
if ((kd = kvm_open("/dev/null", "/dev/null", "/dev/null",
O_RDONLY, "kvm_open")) == NULL)
CRIT_ERR( "cannot read kvm");
@ -7935,7 +7935,7 @@ int main(int argc, char **argv)
*/
main_loop();
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
kvm_close(kd);
#endif

View File

@ -41,14 +41,14 @@
#include <langinfo.h>
#include <wchar.h>
#include <sys/param.h>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/mount.h>
#include <sys/ucred.h>
#include <fcntl.h>
#include <kvm.h>
#endif /* __FreeBSD__ */
#if defined(__FreeBSD__) && (defined(i386) || defined(__i386__))
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && (defined(i386) || defined(__i386__))
#include <machine/apm_bios.h>
#endif /* __FreeBSD__ */
@ -613,11 +613,11 @@ extern char *current_mail_spool;
void update_mail_count();
/* in freebsd.c */
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
kvm_t *kd;
#endif
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
#ifdef __OpenBSD__
typedef struct apm_power_info *apm_info_t;
#endif

View File

@ -270,7 +270,7 @@ update_running_processes()
p = kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
for (i = 0; i < n_processes; i++) {
#if __FreeBSD__ < 5
#if (__FreeBSD__ < 5) && (__FreeBSD_kernel__ < 5)
if (p[i].kp_proc.p_stat == SRUN)
#else
if (p[i].ki_stat == SRUN)

View File

@ -1925,7 +1925,6 @@ Peter Tarjan (ptarjan@citromail.hu)
vol = read_vol;
continue;
}
if (sscanf(line, "level: %d", &vol)) continue;
if (sscanf(line, "mute: %s", mute)) break;
}
}

View File

@ -22,6 +22,10 @@
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <pthread.h>
#include <assert.h>
#include <errno.h>
@ -67,7 +71,7 @@ static int now (struct timespec *abstime)
return (-1);
#ifdef HAVE_CLOCK_GETTIME
return clock_gettime (CLOCK_REALTIME, &abstime);
return clock_gettime (CLOCK_REALTIME, abstime);
#else
/* fallback to gettimeofday () */
struct timeval tv;