machine: ifdef chopping and splicing functions.

This stuff is bad...where did i learn to be doing such things.
edi-0.5
Alastair Poole 3 years ago
parent fe30a5a72f
commit 3ceaad0afd
  1. 4
      src/bin/system/machine/sensors.bogox

@ -333,8 +333,6 @@ system_power_state_get(power_t *power)
#elif defined(__FreeBSD__) || defined(__DragonFly__)
unsigned int value;
size_t len;
#elif defined(__linux__)
char *buf;
#endif
if (!_power_battery_count_get(power))
@ -353,7 +351,7 @@ system_power_state_get(power_t *power)
power->have_ac = value;
#elif defined(__linux__)
buf = file_contents("/sys/class/power_supply/AC/online");
char *buf = file_contents("/sys/class/power_supply/AC/online");
if (buf)
{
power->have_ac = atoi(buf);

Loading…
Cancel
Save