unplug_hist_exit(dip->unplug_hist_handle);
if (output_all_data)
q2d_release(dip->q2d_priv);
+ if (dip->pit_fp)
+ fclose(dip->pit_fp);
free(dip);
}
}
return str;
}
+static inline FILE *open_pit(char *str)
+{
+ FILE *fp = fopen(str, "w");
+
+ if (fp == NULL)
+ perror(str);
+
+ return fp;
+}
+
struct d_info *dip_add(__u32 device, struct io *iop)
{
struct d_info *dip = __dip_find(device);
if (output_all_data)
dip->q2d_priv = q2d_init();
n_devs++;
+ if (per_io_trees)
+ dip->pit_fp = open_pit(mkhandle(per_io_trees,
+ device, "_pit.dat"));
}
if (dip->pre_culling) {