if (link(infile, outfile)) {
#endif
if ((ifd = open(infile, O_RDONLY)) < 0) {
- ast_log(AST_LOG_WARNING, "Unable to open %s in read-only mode\n", infile);
+ ast_log(AST_LOG_WARNING, "Unable to open %s in read-only mode: %s\n", infile, strerror(errno));
return -1;
}
if ((ofd = open(outfile, O_WRONLY | O_TRUNC | O_CREAT, VOICEMAIL_FILE_MODE)) < 0) {
- ast_log(AST_LOG_WARNING, "Unable to open %s in write-only mode\n", outfile);
+ ast_log(AST_LOG_WARNING, "Unable to open %s in write-only mode: %s\n", outfile, strerror(errno));
close(ifd);
return -1;
}