aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2024-09-03 14:21:46 +0000
committerEd Maste <emaste@FreeBSD.org>2024-09-06 12:20:06 +0000
commite7b4f6e0c0640f08acc3d0157a117e58cbf3bf22 (patch)
treea0c1943793ed4a5334df3ad663887cc936fa4a13
parent1ec3289e481ed004f2820abf9a7d56460459d0f4 (diff)
downloadsrc-e7b4f6e0c0640f08acc3d0157a117e58cbf3bf22.tar.gz
src-e7b4f6e0c0640f08acc3d0157a117e58cbf3bf22.zip
beep: show error upon failure to open sound device
If beep cannot open /dev/dsp provide more information to aid the user in diagnosing a problem. Reviewed by: christos Sponsored by: The FreeBSD Foundation (cherry picked from commit 83325e7b738ce87d88553585b135b0e7d15997a6) (cherry picked from commit 7da246dc4ffeba38ad723a1cb72a19511292c840)
-rw-r--r--usr.bin/beep/beep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c
index 151236b4825b..2696bacfacf4 100644
--- a/usr.bin/beep/beep.c
+++ b/usr.bin/beep/beep.c
@@ -202,7 +202,7 @@ main(int argc, char **argv)
f = open(oss_dev, O_WRONLY);
if (f < 0)
- errx(1, "Failed to open '%s'", oss_dev);
+ err(1, "Failed to open '%s'", oss_dev);
c = 1; /* mono */
if (ioctl(f, SOUND_PCM_WRITE_CHANNELS, &c) != 0)