2018-05-12 16:03:00 +00:00
|
|
|
/* */
|
2018-01-19 16:36:40 +00:00
|
|
|
|
|
|
|
#ifndef HAIKU_H_
|
|
|
|
#define HAIKU_H_
|
|
|
|
|
|
|
|
#include <err.h>
|
2018-05-12 16:03:00 +00:00
|
|
|
#include <fcntl.h>
|
2018-01-19 16:36:40 +00:00
|
|
|
#include <limits.h>
|
|
|
|
#include <paths.h>
|
2018-05-12 16:03:00 +00:00
|
|
|
#include <time.h>
|
|
|
|
#include <unistd.h>
|
2018-01-19 16:36:40 +00:00
|
|
|
|
2018-05-12 16:03:00 +00:00
|
|
|
#include <sys/socket.h>
|
2018-01-19 16:36:40 +00:00
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#include <net/if.h>
|
|
|
|
|
|
|
|
#include <kernel/fs_info.h>
|
|
|
|
|
|
|
|
#include "common.h"
|
2018-05-12 16:03:00 +00:00
|
|
|
#include "conky.h"
|
2018-01-19 16:36:40 +00:00
|
|
|
|
|
|
|
int get_entropy_avail(unsigned int *);
|
|
|
|
int get_entropy_poolsize(unsigned int *);
|
|
|
|
|
|
|
|
/* let's just mimic statfs64 */
|
|
|
|
|
|
|
|
struct statfs : public fs_info {};
|
|
|
|
|
2018-05-12 16:03:00 +00:00
|
|
|
inline int statfs(const char *path, struct statfs *buf) {
|
|
|
|
return fs_stat_dev(dev_for_path(path), buf);
|
2018-01-19 16:36:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define f_blocks total_blocks
|
|
|
|
#define f_bsize block_size
|
|
|
|
#define f_bavail free_blocks
|
|
|
|
#define f_bfree free_blocks
|
|
|
|
#define f_fstypename fsh_name
|
|
|
|
|
|
|
|
#endif /*HAIKU_H_*/
|