]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: info - print errors for next_device calls
authorJaroslav Kysela <perex@perex.cz>
Thu, 9 Jan 2025 14:30:45 +0000 (15:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 9 Jan 2025 14:31:08 +0000 (15:31 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/info.c

index 1d648d8703817677aa2f2c8ec4b869582f970df5..31b32945c4e01f318cf99d45dae1f6eae7b55a56 100644 (file)
@@ -35,7 +35,7 @@ static int pcm_device_list(snd_ctl_t *ctl, snd_pcm_stream_t stream, bool *first)
        streamfirst = true;
        while (1) {
                if ((err = snd_ctl_pcm_next_device(ctl, &dev)) < 0) {
-                       error("snd_ctl_pcm_next_device");
+                       error("snd_ctl_pcm_next_device: %s", snd_strerror(err));
                        return err;
                }
                if (dev < 0)
@@ -102,7 +102,7 @@ static int rawmidi_device_list(snd_ctl_t *ctl, snd_rawmidi_stream_t stream, bool
        streamfirst = true;
        while (1) {
                if ((err = snd_ctl_rawmidi_next_device(ctl, &dev)) < 0) {
-                       error("snd_ctl_rawmidi_next_device");
+                       error("snd_ctl_rawmidi_next_device: %s", snd_strerror(err));
                        return err;
                }
                if (dev < 0)