- if (!opt_noheader){
- fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
- fputs
- ("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n",
- out_file);
+ if (opt_header == 1) {
+ fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
+ fputs
+ ("<!DOCTYPE rrd SYSTEM \"http://oss.oetiker.ch/rrdtool/rrdtool.dtd\">\n",
+ out_file);
+ fputs("<!-- Round Robin Database Dump -->\n", out_file);
+ fputs("<rrd>\n", out_file);
+ } else if (opt_header == 2) {
+ fputs("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n", out_file);
+ fputs("<!-- Round Robin Database Dump -->\n", out_file);
+ fputs("<rrd xmlns=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n", out_file);
+ fputs("\txsi:schemaLocation=\"http://oss.oetiker.ch/rrdtool/rrdtool-dump.xml http://oss.oetiker.ch/rrdtool/rrdtool-dump.xsd\">\n", out_file);
+ } else {
+ fputs("<!-- Round Robin Database Dump -->\n", out_file);
+ fputs("<rrd>\n", out_file);