Commit Graph

54 Commits

Author SHA1 Message Date
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
perry 4f27ab21b8 /*CONTCOND*/ while (0)'ed macros 2002-11-02 07:30:55 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
jdolecek b144c497d2 sanity changes for NetBSD:
* return ENODEV for write/read methods
* use seltrue for poll method

the old semantics still applies for !NetBSD
2002-10-11 21:35:42 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
deberg 5d6d9530b6 big-endian macros 2002-05-16 20:37:12 +00:00
deberg b4fb0f417f comment out includes for now 2002-01-09 21:10:04 +00:00
deberg 9c0b4c4a97 use SMBDATA for devtbl 2002-01-08 19:52:16 +00:00
deberg 2d6f0a12d0 add public domain license for stubs 2002-01-05 20:29:38 +00:00
deberg 83a9e0488b sync w/ existing headers 2002-01-04 02:57:51 +00:00
deberg f3b1291f2e resolve conflicts 2002-01-04 02:39:37 +00:00
deberg 16208c1279 now that this is in freebsd, import vendor copy as base. 2002-01-04 02:24:57 +00:00
lukem 4f2ad95259 add RCSIDs 2001-11-13 00:56:55 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
wiz ac951736bc `response', not `responce' 2001-06-19 13:45:52 +00:00
thorpej 80cc38a1af Fix a partial construction problem that can cause race conditions
between creation of a file descriptor and close(2) when using kernel
assisted threads.  What we do is stick descriptors in the table, but
mark them as "larval".  This causes essentially everything to treat
it as a non-existent descriptor, except for fdalloc(), which sees a
filled slot so that it won't (incorrectly) allocate it again.  When
a descriptor is fully constructed, the code that has constructed it
marks it as "mature" (which actually clears the "larval" flag), and
things continue to work as normal.

While here, gather all the code that gets a descriptor from the table
into a fd_getfile() function, and call it, rather than having the
same (sometimes incorrect) code copied all over the place.
2001-06-14 20:32:41 +00:00