From 0b6415076cd3cf0d38e0605ee4706ec761c74db4 Mon Sep 17 00:00:00 2001 From: jdolecek Date: Mon, 24 Mar 2003 07:24:02 +0000 Subject: [PATCH] Remove redundant checks for iovcnt > 1. This should be handled properly in the subr_mchain. From Darwin via FreeBSD smb_smb.c rev. 1.5 g/c bogus 'olduio' save/restore, it's not needed --- sys/netsmb/smb_smb.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c index 8e5a93631349..f17ae6c1235b 100644 --- a/sys/netsmb/smb_smb.c +++ b/sys/netsmb/smb_smb.c @@ -1,4 +1,4 @@ -/* $NetBSD: smb_smb.c,v 1.9 2003/03/23 16:51:52 jdolecek Exp $ */ +/* $NetBSD: smb_smb.c,v 1.10 2003/03/24 07:24:02 jdolecek Exp $ */ /* * Copyright (c) 2000-2001 Boris Popov @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.9 2003/03/23 16:51:52 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.10 2003/03/24 07:24:02 jdolecek Exp $"); #include #include @@ -613,17 +613,8 @@ smb_write(struct smb_share *ssp, u_int16_t fid, struct uio *uio, struct smb_cred *scred) { int error = 0, len, tsize, resid; - struct uio olduio; - /* - * review: manage iov more precisely - */ - if (uio->uio_iovcnt != 1) { - SMBERROR("can't handle iovcnt > 1\n"); - return EIO; - } tsize = uio->uio_resid; - olduio = *uio; while (tsize > 0) { len = tsize; error = smb_smb_write(ssp, fid, &len, &resid, uio, scred); @@ -635,9 +626,6 @@ smb_write(struct smb_share *ssp, u_int16_t fid, struct uio *uio, } tsize -= resid; } - if (error) { - *uio = olduio; - } return error; }