Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netsmb add SMB_CAPS() macro, which returns session capab...
details: https://anonhg.NetBSD.org/src/rev/6453d4e5dd71
branches: trunk
changeset: 545236:6453d4e5dd71
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Apr 05 13:13:50 2003 +0000
description:
add SMB_CAPS() macro, which returns session capabilities
diffstat:
sys/netsmb/smb_conn.h | 3 ++-
sys/netsmb/smb_smb.c | 12 ++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diffs (71 lines):
diff -r 5b1185b8808c -r 6453d4e5dd71 sys/netsmb/smb_conn.h
--- a/sys/netsmb/smb_conn.h Sat Apr 05 13:04:42 2003 +0000
+++ b/sys/netsmb/smb_conn.h Sat Apr 05 13:13:50 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_conn.h,v 1.11 2003/04/02 15:03:38 jdolecek Exp $ */
+/* $NetBSD: smb_conn.h,v 1.12 2003/04/05 13:13:50 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -182,6 +182,7 @@
struct uio;
#define SMB_DIALECT(vcp) ((vcp)->vc_sopt.sv_proto)
+#define SMB_CAPS(vcp) ((vcp)->vc_sopt.sv_caps)
struct smb_tran_desc;
diff -r 5b1185b8808c -r 6453d4e5dd71 sys/netsmb/smb_smb.c
--- a/sys/netsmb/smb_smb.c Sat Apr 05 13:04:42 2003 +0000
+++ b/sys/netsmb/smb_smb.c Sat Apr 05 13:13:50 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_smb.c,v 1.17 2003/04/01 08:35:42 jdolecek Exp $ */
+/* $NetBSD: smb_smb.c,v 1.18 2003/04/05 13:13:50 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.17 2003/04/01 08:35:42 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: smb_smb.c,v 1.18 2003/04/05 13:13:50 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -82,7 +82,7 @@
* Specs say up to 64k data bytes, but Windows traffic
* uses 60k... no doubt for some good reason.
*/
- if (vcp->vc_sopt.sv_caps & SMB_CAP_LARGE_READX)
+ if (SMB_CAPS(vcp) & SMB_CAP_LARGE_READX)
return (60*1024);
else
return (vcp->vc_sopt.sv_maxtx);
@@ -95,7 +95,7 @@
* Specs say up to 64k data bytes, but Windows traffic
* uses 60k... probably for some good reason.
*/
- if (vcp->vc_sopt.sv_caps & SMB_CAP_LARGE_WRITEX)
+ if (SMB_CAPS(vcp) & SMB_CAP_LARGE_WRITEX)
return (60*1024);
else
return (vcp->vc_sopt.sv_maxtx);
@@ -789,7 +789,7 @@
{
size_t tsize, len, resid;
int error = 0;
- int rx = (SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_READX);
+ int rx = (SMB_CAPS(SSTOVC(ssp)) & SMB_CAP_LARGE_READX);
tsize = uio->uio_resid;
while (tsize > 0) {
@@ -868,7 +868,7 @@
{
int error = 0;
size_t len, tsize, resid;
- int wx = (SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_WRITEX);
+ int wx = (SMB_CAPS(SSTOVC(ssp)) & SMB_CAP_LARGE_WRITEX);
tsize = uio->uio_resid;
while (tsize > 0) {
Home |
Main Index |
Thread Index |
Old Index