* Re: [alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.172,1.173
[not found] <E1FHG2j-0001sX-Ln@sc8-pr-cvs1.sourceforge.net>
@ 2006-03-09 21:49 ` Lee Revell
2006-03-10 8:16 ` Clemens Ladisch
0 siblings, 1 reply; 3+ messages in thread
From: Lee Revell @ 2006-03-09 21:49 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel, linux-kernel
On Wed, 2006-03-08 at 23:58 -0800, Clemens Ladisch wrote:
> +static const char *usb_error_string(int err)
> +{
> + switch (err) {
> + case -ENODEV:
> + return "no device";
> + case -ENOENT:
> + return "endpoint not enabled";
> + case -EPIPE:
> + return "endpoint stalled";
> + case -ENOSPC:
> + return "not enough bandwidth";
> + case -ESHUTDOWN:
> + return "device disabled";
> + case -EHOSTUNREACH:
> + return "device suspended";
> + case -EINVAL:
> + case -EAGAIN:
> + case -EFBIG:
> + case -EMSGSIZE:
> + return "internal error";
> + default:
> + return "unknown error";
> + }
> +}
Shouldn't a generic facility be created for this? After all these are
standard error codes and it seem like other parts of the kernel might
want to do user friendly error reporting.
Lee
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.172,1.173
2006-03-09 21:49 ` [alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.172,1.173 Lee Revell
@ 2006-03-10 8:16 ` Clemens Ladisch
0 siblings, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2006-03-10 8:16 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel, linux-kernel, usb-devel
Lee Revell wrote:
> On Wed, 2006-03-08 at 23:58 -0800, Clemens Ladisch wrote:
> > +static const char *usb_error_string(int err)
> > +{
> > + switch (err) {
> > + case -ENODEV:
> > + return "no device";
> > + case -ENOENT:
> > + return "endpoint not enabled";
> > + case -EPIPE:
> > + return "endpoint stalled";
> > + case -ENOSPC:
> > + return "not enough bandwidth";
> > + case -ESHUTDOWN:
> > + return "device disabled";
> > + case -EHOSTUNREACH:
> > + return "device suspended";
> > + case -EINVAL:
> > + case -EAGAIN:
> > + case -EFBIG:
> > + case -EMSGSIZE:
> > + return "internal error";
> > + default:
> > + return "unknown error";
> > + }
> > +}
>
> Shouldn't a generic facility be created for this?
Yes, there's nothing audio specific in this function (except for my
decision which codes to lump together as "internal error").
> After all these are standard error codes and it seem like other parts
> of the kernel might want to do user friendly error reporting.
But it seems none of those parts actually does. ;-)
Clemens
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.172,1.173
@ 2006-03-10 8:16 ` Clemens Ladisch
0 siblings, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2006-03-10 8:16 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel, linux-kernel, usb-devel
Lee Revell wrote:
> On Wed, 2006-03-08 at 23:58 -0800, Clemens Ladisch wrote:
> > +static const char *usb_error_string(int err)
> > +{
> > + switch (err) {
> > + case -ENODEV:
> > + return "no device";
> > + case -ENOENT:
> > + return "endpoint not enabled";
> > + case -EPIPE:
> > + return "endpoint stalled";
> > + case -ENOSPC:
> > + return "not enough bandwidth";
> > + case -ESHUTDOWN:
> > + return "device disabled";
> > + case -EHOSTUNREACH:
> > + return "device suspended";
> > + case -EINVAL:
> > + case -EAGAIN:
> > + case -EFBIG:
> > + case -EMSGSIZE:
> > + return "internal error";
> > + default:
> > + return "unknown error";
> > + }
> > +}
>
> Shouldn't a generic facility be created for this?
Yes, there's nothing audio specific in this function (except for my
decision which codes to lump together as "internal error").
> After all these are standard error codes and it seem like other parts
> of the kernel might want to do user friendly error reporting.
But it seems none of those parts actually does. ;-)
Clemens
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-10 8:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1FHG2j-0001sX-Ln@sc8-pr-cvs1.sourceforge.net>
2006-03-09 21:49 ` [alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.172,1.173 Lee Revell
2006-03-10 8:16 ` Clemens Ladisch
2006-03-10 8:16 ` Clemens Ladisch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.