Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/smbfs SMBERROR() purge - replace with KASSERT()s, pan...
details: https://anonhg.NetBSD.org/src/rev/1543e793f842
branches: trunk
changeset: 543391:1543e793f842
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Feb 24 09:30:42 2003 +0000
description:
SMBERROR() purge - replace with KASSERT()s, panic or remove altogether
as appropriate
diffstat:
sys/fs/smbfs/smbfs_io.c | 9 ++++-----
sys/fs/smbfs/smbfs_smb.c | 17 +++++++++--------
sys/fs/smbfs/smbfs_vfsops.c | 5 +----
3 files changed, 14 insertions(+), 17 deletions(-)
diffs (88 lines):
diff -r fd4debe524ce -r 1543e793f842 sys/fs/smbfs/smbfs_io.c
--- a/sys/fs/smbfs/smbfs_io.c Mon Feb 24 09:18:56 2003 +0000
+++ b/sys/fs/smbfs/smbfs_io.c Mon Feb 24 09:30:42 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smbfs_io.c,v 1.7 2003/02/23 19:35:14 jdolecek Exp $ */
+/* $NetBSD: smbfs_io.c,v 1.8 2003/02/24 09:30:42 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001, Boris Popov
@@ -237,10 +237,9 @@
struct proc *p;
int error = 0;
- if (vp->v_type != VREG) {
- SMBERROR("vn types other than VREG unsupported !\n");
- return EIO;
- }
+ /* vn types other than VREG unsupported */
+ KASSERT(vp->v_type == VREG);
+
SMBVDEBUG("ofs=%d,resid=%d\n",(int)uiop->uio_offset, uiop->uio_resid);
if (uiop->uio_offset < 0)
return EINVAL;
diff -r fd4debe524ce -r 1543e793f842 sys/fs/smbfs/smbfs_smb.c
--- a/sys/fs/smbfs/smbfs_smb.c Mon Feb 24 09:18:56 2003 +0000
+++ b/sys/fs/smbfs/smbfs_smb.c Mon Feb 24 09:30:42 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smbfs_smb.c,v 1.8 2003/02/23 22:03:11 christos Exp $ */
+/* $NetBSD: smbfs_smb.c,v 1.9 2003/02/24 09:30:43 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -283,7 +283,6 @@
mb_put_uint8(mbp, 0);
smb_rq_bend(rqp);
error = smb_rq_simple(rqp);
- SMBERROR("%d\n", error);
if (error)
break;
} while(0);
@@ -1113,9 +1112,11 @@
fxsz = 64;
recsz = next ? next : fxsz + size;
break;
+#ifdef DIAGNOSTIC
default:
- SMBERROR("unexpected info level %d\n", ctx->f_infolevel);
- return EINVAL;
+ panic("smbfs_findnextLM2: unexpected info level %d\n",
+ ctx->f_infolevel);
+#endif
}
nmlen = min(size, SMB_MAXFNAMELEN);
cp = ctx->f_name;
@@ -1126,10 +1127,10 @@
cnt = next - nmlen - fxsz;
if (cnt > 0)
md_get_mem(mbp, NULL, cnt, MB_MSYSTEM);
- else if (cnt < 0) {
- SMBERROR("out of sync\n");
- return EBADRPC;
- }
+#ifdef DIAGNOSTIC
+ else if (cnt < 0)
+ panic("smbfs_findnextLM2: out of sync");
+#endif
}
if (nmlen && cp[nmlen - 1] == 0)
nmlen--;
diff -r fd4debe524ce -r 1543e793f842 sys/fs/smbfs/smbfs_vfsops.c
--- a/sys/fs/smbfs/smbfs_vfsops.c Mon Feb 24 09:18:56 2003 +0000
+++ b/sys/fs/smbfs/smbfs_vfsops.c Mon Feb 24 09:30:42 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smbfs_vfsops.c,v 1.14 2003/02/23 22:31:17 jdolecek Exp $ */
+/* $NetBSD: smbfs_vfsops.c,v 1.15 2003/02/24 09:30:43 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001, Boris Popov
@@ -186,9 +186,6 @@
VOP_UNLOCK(vp, 0);
SMBVDEBUG("root.v_usecount = %d\n", vp->v_usecount);
-#ifdef DIAGNOSTICS
- SMBERROR("mp=%p\n", mp);
-#endif
return (0);
bad:
Home |
Main Index |
Thread Index |
Old Index