Add errno translation for bio operations

This commit is contained in:
justin 2014-08-25 10:21:39 +00:00
parent 39705e3af5
commit 103543d43b
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rumpuser_bio.c,v 1.8 2014/06/16 21:07:28 alnsn Exp $ */
/* $NetBSD: rumpuser_bio.c,v 1.9 2014/08/25 10:21:39 justin Exp $ */
/*-
* Copyright (c) 2013 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
__RCSID("$NetBSD: rumpuser_bio.c,v 1.8 2014/06/16 21:07:28 alnsn Exp $");
__RCSID("$NetBSD: rumpuser_bio.c,v 1.9 2014/08/25 10:21:39 justin Exp $");
#endif /* !lint */
#include <sys/types.h>
@ -75,7 +75,7 @@ dobio(struct rumpuser_bio *biop)
biop->bio_dlen, biop->bio_off);
if (rv < 0) {
rv = 0;
error = errno;
error = rumpuser__errtrans(errno);
}
} else {
error = 0;
@ -83,7 +83,7 @@ dobio(struct rumpuser_bio *biop)
biop->bio_dlen, biop->bio_off);
if (rv < 0) {
rv = 0;
error = errno;
error = rumpuser__errtrans(errno);
} else if (biop->bio_op & RUMPUSER_BIO_SYNC) {
#ifdef __NetBSD__
fsync_range(biop->bio_fd, FDATASYNC,