File: fs.h

package info (click to toggle)
conky 1.9.0-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,764 kB
  • ctags: 3,934
  • sloc: ansic: 27,033; sh: 11,594; xml: 6,001; makefile: 283; python: 16
file content (35 lines) | stat: -rw-r--r-- 1,011 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*- */

#ifndef _FS_H
#define _FS_H

#include "conky.h"	/* DEFAULT_TEXT_BUFFER_SIZE */

/* needed here and by fs.c */
struct fs_stat {
	char path[DEFAULT_TEXT_BUFFER_SIZE];
	char type[DEFAULT_TEXT_BUFFER_SIZE];
	long long size;
	long long avail;
	long long free;
	char set;
};

/* forward declare to make gcc happy (fs.h <-> text_object.h include) */
struct text_object;

void init_fs_bar(struct text_object *, const char *);
void print_fs_bar(struct text_object *, int, char *, int);

void init_fs(struct text_object *, const char *);
void print_fs_perc(struct text_object *, int, char *, int);
void print_fs_free(struct text_object *, char *, int);
void print_fs_size(struct text_object *, char *, int);
void print_fs_used(struct text_object *, char *, int);
void print_fs_type(struct text_object *, char *, int);

int update_fs_stats(void);
struct fs_stat *prepare_fs_stat(const char *path);
void clear_fs_stats(void);

#endif /* _FS_H */