]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsactl: fix error handling in check_control_cdev()
authorqaqland <anguoli@uniontech.com>
Thu, 27 Nov 2025 03:13:27 +0000 (11:13 +0800)
committerJaroslav Kysela <perex@perex.cz>
Fri, 5 Dec 2025 18:16:16 +0000 (19:16 +0100)
Closes: https://github.com/alsa-project/alsa-utils/pull/310
Signed-off-by: qaqland <anguoli@uniontech.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsactl/monitor.c

index 36e9398a4943668756676219c32cfd78c80bede3..e830ba56db82e37c930d9bfdc51d4c12baf8fa0d 100644 (file)
@@ -176,7 +176,7 @@ static int check_control_cdev(int infd, bool *retry)
                ssize_t len = read(infd, buf, sizeof(*ev) + NAME_MAX);
                if (len < 0) {
                        if (errno != EAGAIN)
-                               err = errno;
+                               err = -errno;
                        break;
                } else if (len == 0) {
                        break;