/*****************************************************************************
- * RRDtool 1.2.13 Copyright by Tobi Oetiker, 1997-2006
+ * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007
*****************************************************************************
* rrd_create.c creates new rrds
*****************************************************************************/
#include "rrd_is_thread_safe.h"
-unsigned long FnvHash(char *str);
+unsigned long FnvHash(const char *str);
int create_hw_contingent_rras(rrd_t *rrd, unsigned short period, unsigned long hashed_name);
-void parseGENERIC_DS(char *def,rrd_t *rrd, int ds_idx);
+void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx);
int
rrd_create(int argc, char **argv)
}
rc = rrd_create_r(argv[optind],
pdp_step, last_up,
- argc - optind - 1, argv + optind + 1);
+ argc - optind - 1, (const char **)(argv + optind + 1));
return rc;
}
/* #define DEBUG */
int
-rrd_create_r(char *filename,
+rrd_create_r(const char *filename,
unsigned long pdp_step, time_t last_up,
- int argc, char **argv)
+ int argc, const char **argv)
{
rrd_t rrd;
long i;
return rrd_create_fn(filename, &rrd);
}
-void parseGENERIC_DS(char *def,rrd_t *rrd, int ds_idx)
+void parseGENERIC_DS(const char *def,rrd_t *rrd, int ds_idx)
{
char minstr[DS_NAM_SIZE], maxstr[DS_NAM_SIZE];
/*
/* create and empty rrd file according to the specs given */
int
-rrd_create_fn(char *file_name, rrd_t *rrd)
+rrd_create_fn(const char *file_name, rrd_t *rrd)
{
unsigned long i,ii;
FILE *rrd_file;