closedir(dir);
strncpy_nt(cfg.dbdir, p.dirname, 512);
if (!db_open_ro()) {
- printf("Error: Unable to open database \"%s/%s\": %s\n", p.dirname, DATABASEFILE, strerror(errno));
+ printf("Error: Failed to open database \"%s/%s\" in read-only mode.\n", p.dirname, DATABASEFILE);
if (errno == ENOENT) {
printf("The vnStat daemon should have created the database when started.\n");
printf("Check that it is configured and running. See also \"man vnstatd\".\n");
setuser(s.user);
if (!db_open_rw(1)) {
- printf("Error: Unable to open database \"%s/%s\": %s\n", s.dirname, DATABASEFILE, strerror(errno));
+ printf("Error: Failed to open database \"%s/%s\" in read/write mode.\n", s.dirname, DATABASEFILE);
printf("Exiting...\n");
exit(EXIT_FAILURE);
}
void handledatabase(IPARAMS *p, IMAGECONTENT *ic)
{
if (!db_open_ro()) {
- printf("Error: Unable to open database \"%s/%s\": %s\n", cfg.dbdir, DATABASEFILE, strerror(errno));
+ printf("Error: Failed to open database \"%s/%s\" in read-only mode.\n", cfg.dbdir, DATABASEFILE);
exit(EXIT_FAILURE);
}
if (!db_getinterfacecountbyname(p->interface)) {