… rather, simply record zeros in that case. Swap may be switched on and off at
arbitrary times and/or might be added at "later" times. Thus, storing zero in
case the swap plugin is enabled sounds like the best approach to me.
sstrerror (errno, errbuf, sizeof (errbuf)));
}
- if ((swap_total == 0LL) || ((swap_free + swap_cached) > swap_total))
+ if ((swap_free + swap_cached) > swap_total)
return (-1);
swap_used = swap_total - (swap_free + swap_cached);