Home | History | Annotate | Download | only in hud

Lines Matching defs:dsi

90    list_for_each_entry(struct diskstat_info, dsi, &gdiskstat_list, list) {
91 if (dsi->mode != mode)
93 if (strcasecmp(dsi->name, n) == 0)
94 return dsi;
125 struct diskstat_info *dsi = gr->query_data;
128 if (dsi->last_time) {
129 if (dsi->last_time + gr->pane->period <= now) {
131 if (get_file_values(dsi->sysfs_filename, &stat) < 0)
135 switch (dsi->mode) {
139 dsi->last_stat.r_sectors) * 512) /
145 dsi->last_stat.w_sectors) * 512) /
151 dsi->last_stat = stat;
152 dsi->last_time = now;
157 switch (dsi->mode) {
160 get_file_values(dsi->sysfs_filename, &dsi->last_stat);
163 dsi->last_time = now;
178 struct diskstat_info *dsi;
184 dsi = find_dsi_by_name(dev_name, mode);
185 if (!dsi)
192 dsi->mode = mode;
193 if (dsi->mode == DISKSTAT_RD) {
194 snprintf(gr->name, sizeof(gr->name), "%s-Read-MB/s", dsi->name);
196 else if (dsi->mode == DISKSTAT_WR) {
197 snprintf(gr->name, sizeof(gr->name), "%s-Write-MB/s", dsi->name);
202 gr->query_data = dsi;
212 struct diskstat_info *dsi = CALLOC_STRUCT(diskstat_info);
214 strcpy(dsi->name, name);
215 snprintf(dsi->sysfs_filename, sizeof(dsi->sysfs_filename), "%s/%s/stat",
217 dsi->mode = objmode;
218 list_addtail(&dsi->list, &gdiskstat_list);
225 struct diskstat_info *dsi = CALLOC_STRUCT(diskstat_info);
227 strcpy(dsi->name, name);
228 snprintf(dsi->sysfs_filename, sizeof(dsi->sysfs_filename), "%s/stat",
230 dsi->mode = objmode;
231 list_addtail(&dsi->list, &gdiskstat_list);
314 list_for_each_entry(struct diskstat_info, dsi, &gdiskstat_list, list) {
317 dsi->mode == DISKSTAT_RD ? "rd" :
318 dsi->mode == DISKSTAT_WR ? "wr" : "undefined", dsi->name);