-/* $OpenBSD: rip.c,v 1.18 2019/06/28 13:35:00 deraadt Exp $ */
+/* $OpenBSD: rip.c,v 1.19 2022/10/07 19:59:19 krw Exp $ */
/*
* Copyright (c) 2007 Alexey Vatchenko <av@bsdua.org>
if (ti->fd >= 0 &&
(write_sector(ti->fd, sec, blksize) != 0)) {
free(sec);
- warnx("\nerror while writing to the %s file",
- ti->name);
+ fprintf(stderr, "\nerror while writing to the "
+ "%s file\n", ti->name);
return (-1);
}
if (ti->hdl != NULL &&
(sio_write(ti->hdl, sec, blksize) == 0)) {
sio_close(ti->hdl);
ti->hdl = NULL;
- warnx("\nerror while writing to audio output");
+ fprintf(stderr, "\nerror while writing to audio "
+ "output\n");
return (-1);
}
i++;
} else if (error != EAGAIN) {
free(sec);
- warnx("\nerror while reading from device");
+ fprintf(stderr, "\nerror while reading from device\n");
return (-1);
}
}
info.fd = -1;
}
if (error != 0) {
- warnx("can't rip %u track",
+ fprintf(stderr, "can't rip track %u\n",
toc_buffer[i].track);
break;
}