mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
Revert b6e691e8ac
, fix original problem.
This commit is contained in:
parent
eb722bf30d
commit
8e55089537
15
src/conky.c
15
src/conky.c
@ -4342,8 +4342,7 @@ static void generate_text_internal(char *p, int p_max_size,
|
||||
}
|
||||
OBJ(fs_free) {
|
||||
if (obj->data.fs != NULL) {
|
||||
human_readable( (obj->data.fs->free ? obj->data.fs->free :
|
||||
obj->data.fs->avail), p, 255);
|
||||
human_readable(obj->data.fs->avail, p, 255);
|
||||
}
|
||||
}
|
||||
OBJ(fs_free_perc) {
|
||||
@ -4351,9 +4350,7 @@ static void generate_text_internal(char *p, int p_max_size,
|
||||
int val = 0;
|
||||
|
||||
if (obj->data.fs->size) {
|
||||
val = (obj->data.fs->free ? obj->data.fs->free :
|
||||
obj->data.fs->avail) * 100 /
|
||||
obj->data.fs->size;
|
||||
val = obj->data.fs->free * 100 / obj->data.fs->size;
|
||||
}
|
||||
|
||||
percent_print(p, p_max_size, val);
|
||||
@ -4370,8 +4367,8 @@ static void generate_text_internal(char *p, int p_max_size,
|
||||
}
|
||||
OBJ(fs_used) {
|
||||
if (obj->data.fs != NULL) {
|
||||
human_readable(obj->data.fs->size - (obj->data.fs->free
|
||||
? obj->data.fs->free : obj->data.fs->avail), p, 255);
|
||||
human_readable(obj->data.fs->size - obj->data.fs->free, p,
|
||||
255);
|
||||
}
|
||||
}
|
||||
OBJ(fs_bar_free) {
|
||||
@ -4409,8 +4406,8 @@ static void generate_text_internal(char *p, int p_max_size,
|
||||
int val = 0;
|
||||
|
||||
if (obj->data.fs->size) {
|
||||
val = (obj->data.fs->free ? obj->data.fs->free :
|
||||
obj->data.fs->avail) * 100 /
|
||||
val = obj->data.fs->free
|
||||
* 100 /
|
||||
obj->data.fs->size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user