more helpful error messages

This commit is contained in:
cathugger 2022-12-19 18:30:24 +02:00
parent d202229a43
commit 309b86fd59
No known key found for this signature in database
GPG Key ID: 9BADDA2DAF6F01A8
3 changed files with 3 additions and 3 deletions

2
main.c
View File

@ -214,7 +214,7 @@ static void savecheckpoint(void)
if (syncwrite(checkpointfile,1,checkpoint,SEED_LEN) < 0) {
pthread_mutex_lock(&fout_mutex);
fprintf(stderr,"ERROR: could not save checkpoint\n");
fprintf(stderr,"ERROR: could not save checkpoint to \"%s\"\n",checkpointfile);
pthread_mutex_unlock(&fout_mutex);
}
}

View File

@ -102,7 +102,7 @@ static void onionready(char *sname,const u8 *secret,const u8 *pubonion)
if (!yamloutput) {
if (createdir(sname,1) != 0) {
pthread_mutex_lock(&fout_mutex);
fprintf(stderr,"ERROR: could not create directory for key output\n");
fprintf(stderr,"ERROR: could not create directory \"%s\" for key output\n",sname);
pthread_mutex_unlock(&fout_mutex);
return;
}

2
yaml.c
View File

@ -274,7 +274,7 @@ int yamlin_parseandcreate(
sigprocmask(SIG_BLOCK,&nset,&oset);
#endif
if (createdir(sname,1) != 0) {
fprintf(stderr,"ERROR: could not create directory for key output\n");
fprintf(stderr,"ERROR: could not create directory \"%s\" for key output\n",sname);
return 1;
}