From: krw Date: Fri, 7 Oct 2022 19:59:19 +0000 (+0000) Subject: Fix some error output, replacing some silly 'warnx("\n...")' with X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5cb1d9dce18f152bf9f5d7d4251dafe18a5c0c82;p=openbsd Fix some error output, replacing some silly 'warnx("\n...")' with fprintf(stderr, "\n..."). Reported by Michael Siegel via bugs@. ok tb@ (with some further suggestions) --- diff --git a/usr.bin/cdio/rip.c b/usr.bin/cdio/rip.c index a655a289b7f..3ff1c8e05db 100644 --- a/usr.bin/cdio/rip.c +++ b/usr.bin/cdio/rip.c @@ -1,4 +1,4 @@ -/* $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 @@ -394,22 +394,23 @@ read_track(struct track *ti) 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); } } @@ -565,7 +566,7 @@ rip_tracks_loop(struct track_pair *tp, u_int n_tracks, 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; }