Commit Graph

71 Commits

Author SHA1 Message Date
jdolecek 5cc8e19b22 drop trailing $ added to FreeBSD RCS Id in last rev by mistake 2003-03-24 07:36:36 +00:00
jdolecek 0b6415076c 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
2003-03-24 07:24:02 +00:00
jdolecek 5e1aff13f2 Pullup FreeBSD rev. 1.3 of this file - support for iovcnt greater than
1 in mb_put_uio(), mb_get_uio()
2003-03-24 07:09:34 +00:00
jdolecek 568fd88386 struct smb_rq diet - g/c unused structure members, and move some stuff
around to not waste space with alignment padding
2003-03-23 16:57:51 +00:00
jdolecek b05cd2b635 translate ERRDOS/ERRnofiles to ENOENT in smb_maperror(), and simplify
handling in smbfs_smb_search() appropriately - avoids using
sr_errclass&sr_serror too
2003-03-23 16:55:54 +00:00
jdolecek 4e2b57cec2 don't use rqp->{sr_errclass|sr_serror} - use the translated error
number instead
g/c SMB_DIALECT_MAX, it's not used
2003-03-23 16:51:52 +00:00
jdolecek 4a53d44e24 md_get_uint16le() doesn't like NULL target; change to md_get_uint16() 2003-03-23 16:46:41 +00:00
jdolecek 0e82a29d7a remove unused struct members from struct smbioc_rq 2003-03-23 12:17:49 +00:00
jdolecek 3eecb88b32 smb_rq_reply():
* no need to use dummy variables for md_get_*(), just use NULL
* don't bother storing rpflags/rpflags2, it's not used anywhere
* g/c local variable rperror
2003-03-23 11:43:09 +00:00
jdolecek aee3251066 use 'NetBSD' for client OS string 2003-03-23 10:52:03 +00:00
jdolecek 14e421e6b0 constify smb_share_typename() 2003-03-23 10:38:14 +00:00
jdolecek fa1e2856c7 use simpleq instead of tailq for iod_rqlist - simpleq is enough
for our needs here
2003-03-23 10:32:05 +00:00
jdolecek f6f096034a Compute the request timeout time in smb_iod_sendrq() when the request is
sent out, use mono_time instead microtime(), and simplify computation
in smb_iod_sendall(). Also count the timout once, not twice as previous code.

#if 0 iod->iod_lastrqsent, it was write-only
2003-03-23 10:01:31 +00:00
jdolecek 3a7bb2ccf1 smb_rq_new(): use MB_MZERO instead of MB_MSYSTEM+dummy tzero[] 2003-03-23 08:30:37 +00:00
jdolecek 9b7005c79d g/c some non-NetBSD code 2003-03-23 08:28:06 +00:00
kristerw 3a7b34238b The implementation of the try/catch functionality uses two gcc extensions
that our lint does not understand.

One of these extensions (local labels) is needed only when using multiple
try/catch blocks within a function, and the comment before these macros
say that they should be used only once per function so that the implementaton
may be portable.

The other extension (taking the address of a label) is not needed at all.

Remove the use of the extensions.
2003-03-15 02:54:24 +00:00
kristerw 6c096545e5 ISO C requires a statement after a label. 2003-03-15 02:11:43 +00:00
jdolecek ede214240b #if 0 or g/c unused stuff
pointed out by Krister Walfridsson
2003-03-03 21:16:02 +00:00
jdolecek 8984cf4564 add couple more SMB constants and explanation texts 2003-03-02 18:55:48 +00:00
jdolecek d67d6bee01 M_TRYWAIT -> M_WAIT
MGET() -> m_get()
MCLGET() -> m_clget()
c_caddr_t -> const char *
2003-02-26 21:50:15 +00:00
jdolecek 4f88b74062 improve tsleep() wmesgs 2003-02-26 19:31:33 +00:00
jdolecek 11c209aa83 prefix tsleep() wmesg with 'smb', rather than '90'
drop #ifndef __NetBSD__ msleep() code, it only obfuscates the code
2003-02-26 19:30:51 +00:00
jdolecek 2c8e39ef8f need to include <sys/mbuf.h> for M_SONAME 2003-02-26 11:12:28 +00:00
matt 65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
jdolecek e1ea74dfac add __KERNEL_RCSID 2003-02-25 09:12:11 +00:00
jdolecek c672cc0379 make sure sr_bcount, sr_rqtid and sr_rquid are wrote in alignment-safe way
problem pointed out by Martin Husemann

while here, turn some checks/SMBERROR()s to #ifdef DIAGNOSTIC panic()s
2003-02-24 21:13:13 +00:00
jdolecek 695a1f63b5 const-poison a bit 2003-02-24 19:32:16 +00:00
jdolecek 9a9493a698 make M_SMBRQ static 2003-02-24 19:31:45 +00:00
briggs 9a152e34ad Define smb_co_lockstatus iff DEBUG || DIAGNOSTIC. 2003-02-24 16:12:08 +00:00
jdolecek 31a056fdaf clarify locking requirements for smb_{share,vc,co}_{rele,put}() - the lock
must be held on entry
drain the lock in smb_co_gone(), so that it's done always
turn some SMBERROR()s to #ifdef DIAGNOSTIC/DEBUG panics
2003-02-24 09:55:37 +00:00
jdolecek ebc50c199c simplify nbssn_rselect() some more 2003-02-21 21:12:24 +00:00
jdolecek aaaa0b09ac rewrite nbssn_rselect() to resemple sys_select() more (as was the
intent); besides being reable now, this fixes (several!) bugs in
timeout calculation, which caused nbssn_rselect() to return
prematurely

put the timeout in separate variable declared on top, so that it's clear
where the value comes from

don't adjust timeout in smb_nbst_connect() - this made the timeout
too short if connect happened to be fast
(XXX perhaps reevaluate this later and put back in some other form)

bump NB_SNDQ/NB_RCVQ to 64k, and actually use the defines to set
snd/rcv buffer sizes

use #define for the snd/rcv timeo

some whitespace/KNF fixes
2003-02-21 20:12:05 +00:00
jdolecek 85f22d966f simlify smb_proc_intr() - p_siglist never contains signals from
p_sigmask or p_sigignore, so no point explicitly removing them

also kill some compatibility macros/defines and use the real thing directly,
it's more readable that way
2003-02-21 19:55:14 +00:00
jdolecek 7002819777 smb_rq_enqueue(): use classic plain interruptible sleep instead
of noniterruptible sleep + smb_proc_intr()
2003-02-21 19:52:58 +00:00
martin 6b7ecffb54 Change a few int -> size_t to make it compile on archs where they are not
the same.
2003-02-19 12:01:37 +00:00
jdolecek 1cacc8d1a4 always include support for password encryption
const-poison smb_crypt.c some
2003-02-19 08:33:08 +00:00
jdolecek 09caa6e970 no opt_smb.h 2003-02-19 08:13:46 +00:00
jdolecek 6b01f028b8 move netsmb-specific entries to netsmb/files.netsmb
g/c options SMB and opt_smb.h
rename the pseudo device to nsmb, and use needs-flag instead needs-count,
 adjust nsmbattach() appropriately
replace SMB_CHECKMINOR() with explicit code in smb_dev.c, to improve readability
2003-02-18 12:18:28 +00:00
jdolecek 7fa45bf7b7 disable debug printf mistakely enabled in previous commit 2003-02-18 11:21:01 +00:00
jdolecek c77076376f smb_rq_bend(): s/htoles/htole16/
smb_rq_reply(): don't bother saving error from md_get_* call when it's ignored
2003-02-18 10:20:50 +00:00
jdolecek fde501ab94 use explicit width macros from <sys/endian.h>, do not define&use
letohs/letohl/letohq and such
2003-02-18 10:18:52 +00:00
jdolecek fce485df80 constify smb_emptypass (it doesn't have any effect, cost for form) 2003-02-18 10:16:49 +00:00
jdolecek 12ce0f9377 replace some magic error number with descriptive defines; meaning of the numbers
found in Samba/Linux smbfs
2003-02-18 10:09:28 +00:00
jdolecek f47f2d7164 pull iconv.h from FreeBSD, update the stub iconv routines to match
this is to provide some stuff used by mount_smbfs / libsmb
2003-02-16 19:50:48 +00:00
jdolecek 3f9fb02e0c don't define FB_CURRENT here 2003-02-16 19:48:10 +00:00
jdolecek 5404a6b6a8 make compile - P_SELECT changed to lwp-specific L_SELECT; use curlwp
as the lwp, hopefully this is actually correct
2003-02-15 23:26:57 +00:00
jdolecek d5e1078f05 adapt to addition of malloc types 2003-02-15 23:02:30 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
wiz 1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00