1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

Revert b6e691e8ac, fix original problem.

This commit is contained in:
Brenden Matthews 2009-06-10 14:13:17 -06:00
parent eb722bf30d
commit 8e55089537

View File

@ -4342,8 +4342,7 @@ static void generate_text_internal(char *p, int p_max_size,
} }
OBJ(fs_free) { OBJ(fs_free) {
if (obj->data.fs != NULL) { if (obj->data.fs != NULL) {
human_readable( (obj->data.fs->free ? obj->data.fs->free : human_readable(obj->data.fs->avail, p, 255);
obj->data.fs->avail), p, 255);
} }
} }
OBJ(fs_free_perc) { OBJ(fs_free_perc) {
@ -4351,9 +4350,7 @@ static void generate_text_internal(char *p, int p_max_size,
int val = 0; int val = 0;
if (obj->data.fs->size) { if (obj->data.fs->size) {
val = (obj->data.fs->free ? obj->data.fs->free : val = obj->data.fs->free * 100 / obj->data.fs->size;
obj->data.fs->avail) * 100 /
obj->data.fs->size;
} }
percent_print(p, p_max_size, val); 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) { OBJ(fs_used) {
if (obj->data.fs != NULL) { if (obj->data.fs != NULL) {
human_readable(obj->data.fs->size - (obj->data.fs->free human_readable(obj->data.fs->size - obj->data.fs->free, p,
? obj->data.fs->free : obj->data.fs->avail), p, 255); 255);
} }
} }
OBJ(fs_bar_free) { OBJ(fs_bar_free) {
@ -4409,8 +4406,8 @@ static void generate_text_internal(char *p, int p_max_size,
int val = 0; int val = 0;
if (obj->data.fs->size) { if (obj->data.fs->size) {
val = (obj->data.fs->free ? obj->data.fs->free : val = obj->data.fs->free
obj->data.fs->avail) * 100 / * 100 /
obj->data.fs->size; obj->data.fs->size;
} }