diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-10-07 19:59:20 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-10-07 19:59:20 +0000 |
commit | e88e1827ae5ec2341a762d4ab662781bb7c474ea (patch) | |
tree | d295cc733eac5a94f549a60ae05d0990e962b478 /usr.bin/cdio | |
parent | 3ea9e0b4e396b8fef05ed0391438cbfa4e842139 (diff) |
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)
Diffstat (limited to 'usr.bin/cdio')
-rw-r--r-- | usr.bin/cdio/rip.c | 13 |
1 files changed, 7 insertions, 6 deletions
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 <av@bsdua.org> @@ -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; } |