diff --git a/sys/fs/smbfs/smbfs_smb.c b/sys/fs/smbfs/smbfs_smb.c index 67754a400b36..dca6b33bbce7 100644 --- a/sys/fs/smbfs/smbfs_smb.c +++ b/sys/fs/smbfs/smbfs_smb.c @@ -1,4 +1,4 @@ -/* $NetBSD: smbfs_smb.c,v 1.30 2006/06/07 22:33:38 kardel Exp $ */ +/* $NetBSD: smbfs_smb.c,v 1.31 2006/08/28 15:56:56 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.30 2006/06/07 22:33:38 kardel Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.31 2006/08/28 15:56:56 christos Exp $"); #include #include @@ -1054,8 +1054,10 @@ smbfs_smb_trans2find2(struct smbfs_fctx *ctx) return error; if ((error = md_get_uint16le(mdp, &tw)) != 0) return error; - if (ctx->f_ecnt == 0) + if (ctx->f_ecnt == 0) { + ctx->f_flags |= SMBFS_RDD_EOF | SMBFS_RDD_NOCLOSE; return ENOENT; + } ctx->f_rnameofs = tw; mdp = &t2p->t2_rdata;