Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177592981
D56845.1794810802.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
722 B
Referenced Files
None
Subscribers
None
D56845.1794810802.diff
View Options
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
@@ -70,8 +70,10 @@
optarg += 3;
errno = 0;
dunit = strtol(optarg, NULL, 10);
- if (errno == EINVAL || errno == ERANGE)
- err(1, "strtol(%s)", optarg);
+ if (errno == EINVAL)
+ err(1, "Can not convert '%s' to a number", optarg);
+ if (errno == ERANGE)
+ err(1, "%s", optarg);
dflag = 1;
break;
case 'f':
@@ -332,6 +334,8 @@
warn("cannot get default unit");
return (-1);
}
+ if (dunit > mixer_get_nmixers())
+ errx(1, "No such mixer unit: %d", dunit);
if (mixer_set_dunit(m, dunit) < 0) {
warn("cannot set default unit to %d", dunit);
return (-1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 6:33 AM (19 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36999789
Default Alt Text
D56845.1794810802.diff (722 B)
Attached To
Mode
D56845: mixer: Improve error messages
Attached
Detach File
Event Timeline