All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Miartus <amiartus@de.adit-jv.com>
To: patch@alsa-project.org
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 2/2] pcm_file: return errno
Date: Mon, 24 Jun 2019 13:23:24 +0200	[thread overview]
Message-ID: <1561375404-25252-2-git-send-email-amiartus@de.adit-jv.com> (raw)
In-Reply-To: <1561375404-25252-1-git-send-email-amiartus@de.adit-jv.com>

Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
---
 src/pcm/pcm_file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
index 11d0953..3712fd8 100644
--- a/src/pcm/pcm_file.c
+++ b/src/pcm/pcm_file.c
@@ -402,6 +402,7 @@ static int snd_pcm_file_write_bytes(snd_pcm_t *pcm, size_t bytes)
 			n = cont;
 		err = write(file->fd, file->wbuf + file->file_ptr_bytes, n);
 		if (err < 0) {
+			err = errno;
 			SYSERR("%s write failed, file data may be corrupt", file->fname);
 			return err;
 		}
-- 
2.7.4

  reply	other threads:[~2019-06-24 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 11:23 [PATCH 1/2] pcm_file: remove double line Adam Miartus
2019-06-24 11:23 ` Adam Miartus [this message]
2019-06-24 12:12   ` [PATCH 2/2] pcm_file: return errno Takashi Iwai
2019-06-24 12:13 ` [PATCH 1/2] pcm_file: remove double line Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1561375404-25252-2-git-send-email-amiartus@de.adit-jv.com \
    --to=amiartus@de.adit-jv.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=patch@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.