xprintf(--tab, "</filesystems>");
}
+
+/*
+ ***************************************************************************
+ * Display Fibre Channel HBA statistics in XML.
+ *
+ * IN:
+ * @a Activity structure with statistics.
+ * @curr Index in array for current sample statistics.
+ * @tab Indentation in XML output.
+ * @itv Interval of time in jiffies.
+ ***************************************************************************
+ */
+__print_funct_t xml_print_fc_stats(struct activity *a, int curr, int tab,
+ unsigned long long itv)
+{
+ int i;
+ struct stats_fc *sfcc, *sfcp;
+
+ xprintf(tab, "<fc>");
+ tab++;
+
+ for (i = 0; i < a->nr; i++) {
+
+ sfcc = (struct stats_fc *) ((char *) a->buf[curr] + i * a->msize);
+ sfcp = (struct stats_fc *) ((char *) a->buf[!curr] + i * a->msize);
+
+ xprintf(tab, "<hba name=\"%s\" "
+ "rxframes=\"%.2f\" "
+ "txframes=\"%.2f\" "
+ "rxwords=\"%.2f\" "
+ "txwords=\"%.2f\"/>",
+ sfcc->hba_name,
+ S_VALUE(sfcp->f_rxframes, sfcc->f_rxframes, itv),
+ S_VALUE(sfcp->f_txframes, sfcc->f_txframes, itv),
+ S_VALUE(sfcp->f_rxwords, sfcc->f_rxwords, itv),
+ S_VALUE(sfcp->f_txwords, sfcc->f_rxwords, itv));
+ }
+
+ xprintf(--tab, "</fc>");
+}
(struct activity *, int, int, unsigned long long);
extern __print_funct_t xml_print_filesystem_stats
(struct activity *, int, int, unsigned long long);
+extern __print_funct_t xml_print_fc_stats
+ (struct activity *, int, int, unsigned long long);
#endif /* _XML_STATS_H */