X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_restore.c;h=ad53adf425a66dbc7c57d04978da9bbaa4928b9a;hb=413fdcdf1a87c7380e17f5f943b353353c65d760;hp=4950cd96c366a8be7d75437cb2e6db43b7e0a00f;hpb=f439b204fb1481edd6a777a3b172ccd722b5b6ed;p=rrdtool.git diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 4950cd9..ad53adf 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.2rc5 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.6 Copyright by Tobi Oetiker, 1997-2005 ***************************************************************************** * rrd_restore.c creates new rrd from data dumped by rrd_dump.c *****************************************************************************/ @@ -137,7 +137,7 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ } if (atoi(rrd -> stat_head -> version) < 2) { - rrd_set_error("Can only restore version >= 2 (Not %s). Dump your rrd using a current rrdtool dump.", rrd -> stat_head -> version ); + rrd_set_error("Can only restore version >= 2 (Not %s). Dump your old rrd using a current rrdtool dump.", rrd -> stat_head -> version ); free(rrd -> stat_head); return -1; } @@ -488,6 +488,7 @@ rrd_restore(int argc, char **argv) char force_overwrite = 0; /* init rrd clean */ + optind = 0; opterr = 0; /* initialize getopt */ rrd_init(&rrd); if (argc<3) { rrd_set_error("usage rrdtool %s [--range-check/-r] [--force-overwrite/-f] file.xml file.rrd",argv[0]);