mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
apm should work with openbsd now
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@863 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
a2fbf01fe2
commit
d5634abad4
@ -35,6 +35,7 @@
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/sensors.h>
|
||||
#include <machine/apmvar.h>
|
||||
#endif /* __OpenBSD__ */
|
||||
|
||||
#ifdef AUDACIOUS
|
||||
@ -563,9 +564,10 @@ kvm_t *kd;
|
||||
#endif
|
||||
|
||||
#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
|
||||
#ifdef __FreeBSD__
|
||||
int apm_getinfo(int fd, apm_info_t aip);
|
||||
#ifdef __OpenBSD__
|
||||
typedef struct apm_power_info *apm_info_t;
|
||||
#endif
|
||||
int apm_getinfo(int fd, apm_info_t aip);
|
||||
char *get_apm_adapter(void);
|
||||
char *get_apm_battery_life(void);
|
||||
char *get_apm_battery_time(void);
|
||||
|
@ -675,9 +675,9 @@ proc_find_top(struct process **cpu, struct process **mem)
|
||||
#define APM_UNKNOWN 255
|
||||
|
||||
int
|
||||
apm_getinfo(int fd, void *null)
|
||||
apm_getinfo(int fd, apm_info_t aip)
|
||||
{
|
||||
if (ioctl(fd, APM_IOC_GETPOWER) == -1)
|
||||
if (ioctl(fd, APM_IOC_GETPOWER, aip) == -1)
|
||||
return (-1);
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user