Print error messages to stderr

This commit is contained in:
Baptiste Daroussin 2016-04-16 12:32:26 +00:00
parent 7696368682
commit 7b7b2a3b8a

View file

@ -2084,13 +2084,13 @@ dump_cachefile(const char *cachefile)
nvlist_t *config;
if ((fd = open64(cachefile, O_RDONLY)) < 0) {
(void) printf("cannot open '%s': %s\n", cachefile,
(void) fprintf(stderr, "cannot open '%s': %s\n", cachefile,
strerror(errno));
exit(1);
}
if (fstat64(fd, &statbuf) != 0) {
(void) printf("failed to stat '%s': %s\n", cachefile,
(void) fprintf(stderr, "failed to stat '%s': %s\n", cachefile,
strerror(errno));
exit(1);
}