#include <sys/stat.h>
#include <unistd.h>
-#define LOCAL_DEBUG 0
-
struct stat_s
{
/* Read */
}
}
-static void
-free_query_data(void *p)
-{
- struct diskstat_info *nic = (struct diskstat_info *) p;
- list_del(&nic->list);
- FREE(nic);
-}
-
/**
* Create and initialize a new object for a specific block I/O device.
* \param pane parent context.
if (num_devs <= 0)
return;
-#if LOCAL_DEBUG
- printf("%s(%s, %s) - Creating HUD object\n", __func__, dev_name,
- mode == DISKSTAT_RD ? "RD" :
- mode == DISKSTAT_WR ? "WR" : "UNDEFINED");
-#endif
-
dsi = find_dsi_by_name(dev_name, mode);
if (!dsi)
return;
gr->query_data = dsi;
gr->query_new_value = query_dsi_load;
- /* Don't use free() as our callback as that messes up Gallium's
- * memory debugger. Use simple free_query_data() wrapper.
- */
- gr->free_query_data = free_query_data;
-
hud_pane_add_graph(pane, gr);
hud_pane_set_max_value(pane, 100);
}