int rrd_dump_opt_r(
const char *filename,
char *outname,
int rrd_dump_opt_r(
const char *filename,
char *outname,
{
unsigned int i, ii, ix, iii = 0;
time_t now;
{
unsigned int i, ii, ix, iii = 0;
time_t now;
- 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_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);
}
fputs("<!-- Round Robin Database Dump -->", out_file);
fputs("<rrd>", out_file);
}
fputs("<!-- Round Robin Database Dump -->", out_file);
fputs("<rrd>", out_file);
const char *filename,
char *outname)
{
const char *filename,
char *outname)
{
- return rrd_dump_opt_r(filename,outname,0);
+ return rrd_dump_opt_r(filename, outname, 0);
{
int rc;
int opt_noheader = 0;
{
int rc;
int opt_noheader = 0;
/* init rrd clean */
optind = 0;
opterr = 0; /* initialize getopt */
/* init rrd clean */
optind = 0;
opterr = 0; /* initialize getopt */
int option_index = 0;
static struct option long_options[] = {
{"no-header", no_argument, 0, 'n'},
int option_index = 0;
static struct option long_options[] = {
{"no-header", no_argument, 0, 'n'},
rrd_set_error("usage rrdtool %s [--no-header|-n] "
rrd_set_error("usage rrdtool %s [--no-header|-n] "
- "file.rrd [file.xml]", argv[0]);
+ "file.rrd [file.xml]", argv[0]);
}
if ((argc - optind) == 2) {
}
if ((argc - optind) == 2) {
- rc = rrd_dump_opt_r(argv[optind], argv[optind+1],opt_noheader);
+ rc = rrd_dump_opt_r(argv[optind], argv[optind + 1], opt_noheader);
- rc = rrd_dump_opt_r(argv[optind], NULL,opt_noheader);
+ rc = rrd_dump_opt_r(argv[optind], NULL, opt_noheader);
} else if (strcmp("graphv", argv[1]) == 0) {
info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */
} else if (strcmp("graphv", argv[1]) == 0) {
info_t *grinfo = NULL; /* 1 to distinguish it from the NULL that rrd_graph sends in */
grinfo = rrd_graph_v(argc - 1, &argv[1]);
if (grinfo) {
info_print(grinfo);
grinfo = rrd_graph_v(argc - 1, &argv[1]);
if (grinfo) {
info_print(grinfo);