[alsa-devel] [PATCH 2/2] pcm_file: return errno

Takashi Iwai tiwai at suse.de
Mon Jun 24 14:12:10 CEST 2019


On Mon, 24 Jun 2019 13:23:24 +0200,
Adam Miartus wrote:
> 
> Signed-off-by: Adam Miartus <amiartus at 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;

It must be -errno.


Takashi


More information about the Alsa-devel mailing list