From 2d4d9177b5c522dd2b13e07e3bcf0638653a08fa Mon Sep 17 00:00:00 2001 From: guenther Date: Mon, 11 May 2015 02:01:01 +0000 Subject: [PATCH] Convert from uiomovei() to uiomove() to prevent short tranfers diff from natano@bitrig --- sys/dev/ic/lpt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c index abe25e8d072..39085534c7c 100644 --- a/sys/dev/ic/lpt.c +++ b/sys/dev/ic/lpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt.c,v 1.13 2015/02/10 21:56:09 miod Exp $ */ +/* $OpenBSD: lpt.c,v 1.14 2015/05/11 02:01:01 guenther Exp $ */ /* $NetBSD: lpt.c,v 1.42 1996/10/21 22:41:14 thorpej Exp $ */ /* @@ -367,8 +367,8 @@ lptwrite(dev_t dev, struct uio *uio, int flags) size_t n; int error = 0; - while ((n = min(LPT_BSIZE, uio->uio_resid)) != 0) { - error = uiomovei(sc->sc_cp = sc->sc_inbuf->b_data, n, uio); + while ((n = ulmin(LPT_BSIZE, uio->uio_resid)) != 0) { + error = uiomove(sc->sc_cp = sc->sc_inbuf->b_data, n, uio); if (error != 0) return error; sc->sc_count = n; -- 2.20.1