1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 04:17:33 +00:00

Fix update_total_processes() missing return val.

This commit is contained in:
Brenden Matthews 2019-01-07 19:21:34 -05:00
parent 21b4a0a403
commit 6a7dc0cd65
5 changed files with 19 additions and 7 deletions

View File

@ -33,9 +33,9 @@
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#include <net/if.h>
@ -371,7 +371,8 @@ int update_cpu_usage(void) {
return 0;
}
void free_cpu(struct text_object *) { /* no-op */ }
void free_cpu(struct text_object *) { /* no-op */
}
int update_load_average(void) {
double v[3];
@ -705,7 +706,8 @@ int get_entropy_poolsize(unsigned int *val) {
return 1;
}
void print_sysctlbyname(struct text_object *obj, char *p, unsigned int p_max_size) {
void print_sysctlbyname(struct text_object *obj, char *p,
unsigned int p_max_size) {
u_int val[3] = {0};
char buf[256] = {""};
size_t len = sizeof(val);

View File

@ -77,6 +77,7 @@ int update_net_stats() {
int update_total_processes() {
// TODO
return 0;
}
int update_running_processes() {
@ -143,7 +144,8 @@ int update_cpu_usage() {
return 1;
}
void free_cpu(struct text_object *) { /* no-op */ }
void free_cpu(struct text_object *) { /* no-op */
}
int update_load_average() {
// TODO

View File

@ -27,8 +27,8 @@
*
*/
#include "net_stat.h"
#include "netbsd.h"
#include "net_stat.h"
static kvm_t *kd = nullptr;
int kd_init = 0, nkd_init = 0;
@ -223,6 +223,8 @@ int update_total_processes() {
}
info.procs = n_processes;
return 0;
}
void update_running_processes() {
@ -286,7 +288,8 @@ void update_cpu_usage() {
oldtotal = total;
}
void free_cpu(struct text_object *) { /* no-op */ }
void free_cpu(struct text_object *) { /* no-op */
}
void update_load_average() {
double v[3];

View File

@ -257,6 +257,8 @@ int update_total_processes() {
kvm_getprocs(kd, KERN_PROC_ALL, 0, &n_processes);
info.procs = n_processes;
return 0;
}
void update_running_processes() {

View File

@ -181,6 +181,8 @@ double get_acpi_temperature(int fd) {
int update_total_processes(void) {
kstat_named_t *knp = get_kstat("unix", -1, "system_misc", "nproc");
if (knp != nullptr) info.procs = knp->value.ui32;
return 0;
}
void get_battery_stuff(char *buf, unsigned int n, const char *bat, int item) {
@ -314,7 +316,8 @@ int update_cpu_usage(void) {
return 0;
}
void free_cpu(struct text_object *) { /* no-op */ }
void free_cpu(struct text_object *) { /* no-op */
}
void update_proc_entry(struct process *p) {
psinfo_t proc;