mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-15 09:44:04 +00:00
i8k: print 'error' for i8k variables if /proc/i8k could not be read
this behavior was already present for the status variables but not others
This commit is contained in:
parent
feb6a08537
commit
804631f848
@ -139,7 +139,8 @@ void print_i8k_ac_status(struct text_object *obj, char *p,
|
||||
void print_i8k_##name(struct text_object *obj, char *p, \
|
||||
unsigned int p_max_size) { \
|
||||
(void)obj; \
|
||||
snprintf(p, p_max_size, "%s", i8k.name); \
|
||||
const char *str = i8k.name ? i8k.name : "error"; \
|
||||
snprintf(p, p_max_size, "%s", str); \
|
||||
}
|
||||
|
||||
I8K_PRINT_GENERATOR(version)
|
||||
|
Loading…
Reference in New Issue
Block a user