mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 13:04:35 +03:00
Refactor openzfs_sysctl_init() and ZfsArcMeter...
openzfs_sysctl_init() now returns void instead of int. The ZfsArcStats->enabled flag is set inside the init function now, instead of having to be set from its return value. Preparation for more flag setting in Compressed ARC commit. ZfsArcMeter_readStats() added and all Meter->values[] setting moved to it, eliminating duplicated code in {darwin,freebsd,linux,solaris}/Platform.c.
This commit is contained in:
@ -225,18 +225,7 @@ void Platform_setSwapValues(Meter* this) {
|
||||
void Platform_setZfsArcValues(Meter* this) {
|
||||
SolarisProcessList* spl = (SolarisProcessList*) this->pl;
|
||||
|
||||
this->total = spl->zfs.max;
|
||||
this->values[0] = spl->zfs.MFU;
|
||||
this->values[1] = spl->zfs.MRU;
|
||||
this->values[2] = spl->zfs.anon;
|
||||
this->values[3] = spl->zfs.header;
|
||||
this->values[4] = spl->zfs.other;
|
||||
|
||||
// "Hide" the last value so it can
|
||||
// only be accessed by index and is not
|
||||
// displayed by the Bar or Graph style
|
||||
Meter_setItems(this, 5);
|
||||
this->values[5] = spl->zfs.size;
|
||||
ZfsArcMeter_readStats(this, &(spl->zfs));
|
||||
}
|
||||
|
||||
static int Platform_buildenv(void *accum, struct ps_prochandle *Phandle, uintptr_t addr, const char *str) {
|
||||
|
Reference in New Issue
Block a user