diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -68,7 +68,7 @@ case 'd': dunit = strtol(optarg, NULL, 10); if (errno == EINVAL || errno == ERANGE) - err(1, "strtol"); + err(1, "strtol(%s)", optarg); dflag = 1; break; case 'f': @@ -92,11 +92,11 @@ /* Print all mixers and exit. */ if (aflag) { if ((n = mixer_get_nmixers()) < 0) - err(1, "mixer_get_nmixers"); + errx(1, "no mixers present in the system"); for (i = 0; i < n; i++) { (void)snprintf(buf, sizeof(buf), "/dev/mixer%d", i); if ((m = mixer_open(buf)) == NULL) - err(1, "mixer_open: %s", buf); + errx(1, "%s: no such mixer", buf); initctls(m); if (sflag) printrecsrc(m, oflag); @@ -111,7 +111,7 @@ } if ((m = mixer_open(name)) == NULL) - err(1, "mixer_open: %s", name); + errx(1, "%s: no such mixer", name); initctls(m); @@ -212,7 +212,7 @@ } if (rc) { (void)mixer_close(m); - err(1, "cannot make controls"); + errx(1, "cannot make mixer controls"); } } @@ -315,7 +315,7 @@ return (-1); } if (mixer_set_dunit(m, dunit) < 0) { - warn("cannot set default unit to: %d", dunit); + warn("cannot set default unit to %d", dunit); return (-1); } printf("default_unit: %d -> %d\n", n, dunit);