Commit Graph

24 Commits

Author SHA1 Message Date
jdolecek aaba5c2cd4 unify the statvfs-reporting related code to single smbfs_smb_statvfs routine
for easier maintenance; the decision to use either
SMB_TRANS2_QUERY_FS_INFORMATION or SMB_COM_QUERY_INFORMATION_DISK
is done inside it, the code for populating struct statvfs with values
is shared
2004-06-05 07:36:25 +00:00
jdolecek 88edd838ec set 'frag' size to the same value as the file system block size, so
that userland would pick up correct size of unit (it uses lower of
these values as the size of one 'block' for f_blocks et.al.)
fixes PR bin/25319 by Juan RP
2004-06-05 06:28:11 +00:00
jdolecek 58218d4f0f add comments for values returned from the SMB request info used for statvfs 2004-05-23 11:18:28 +00:00
christos c30382f197 fix fragment size. 2004-04-26 17:08:45 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
jdolecek e36d8bbf0f in smbfs_smb_lookup(), check the returned (found) file name matches
exactly the filename we wanted to lookup, so that file names differing
in case are refused right away

resolves the chdir part of PR kern/22835 by Rob Quinn (cd succeeded when
it was supposed to fail)
2004-03-21 16:04:07 +00:00
christos bbda852cff FIx uninitialized variable warnings 2003-10-25 18:33:37 +00:00
jdolecek 1cd92a1660 use pools instead of malloc(9) for allocation of smb request structures
convert all code to use smb_{rq|t2}_alloc() instead of allocating
structures on stack, make smb_rq_init()/smb_t2_init() static and not
exported outside smb_rq.c
2003-04-07 19:35:39 +00:00
jdolecek e9680c83fc add TNF copyright licence for recent changes 2003-04-07 13:56:13 +00:00
jdolecek c0fd3735dc use NT DIRECTORY CHANGE NOTIFY to watch for directory kevents if the
server supports it
for this, need NT CREATE AND X a directory in smbfs_open(), so that
we get the FID handle used for DIRECTORY CHANGE NOTIFY SMB

this could eventually be used to 'watch' even regular files, by
watching its parent directory and lookup/VN_KNOTE() when we get
REMOVED/RENAMED/MODIFIED action

also reorganize the kqueue code somewhat to use simplify locking
and knote detach
2003-04-07 12:04:15 +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
kristerw 708df50a74 'lint' is a very bad name for a variable. 2003-03-15 02:22:13 +00:00
jdolecek fedc587dac #if 0/notnow stuff which isn't currently used
pointed out by Krister Walfridsson
2003-03-03 21:17:05 +00:00
jdolecek f9d42ade36 add __KERNEL_RCSID() 2003-02-25 09:09:31 +00:00
jdolecek 26d1332b7c since smbfs_fctx.f_fname is always used as 'char', may as well define it
that way rather than u_char
2003-02-24 18:45:35 +00:00
jdolecek da9a088d46 SMBERROR() purge - replace with KASSERT()s, panic or remove altogether
as appropriate
2003-02-24 09:30:42 +00:00
christos 8bf6b72335 style; no space after cast, and add cast to the assignment case too. 2003-02-23 22:03:11 +00:00
jdolecek 9a7b95383e fix KASSERT() in smbfs_findnextLM1() to actually compile 2003-02-23 21:26:26 +00:00
jdolecek dfc181b14f some KNF, add a KASSERT() for smbfs_findnextLM1() case
replace some 'never should happen' printfs with KASSERTs
2003-02-21 20:15:01 +00:00
jdolecek 5c10202b37 do previous differently - pass ap->a_id down to smbfs_smb_lock()
and smbfs_smb_lockandx() as caddr_t, and mask it to 16bit value
in smbfs_smb_lockandx()
okayed by Martin
2003-02-19 13:51:24 +00:00
martin 681bcd85a7 SMB lock ids apparently are 16bit items. And the code uses id 1 always.
No need to cast it back and forth to a caddr_t and u_int32_t - which does
not work well on 64bit archs.
2003-02-19 12:44:47 +00:00
jdolecek 309faeafd5 smbfs_smb_create(): use SMB_COM_CREATE_NEW rather than SMB_COM_CREATE; the
latter truncates the file if it exists, which we don't want to do
change the code a bit to be easier to read
2003-02-18 12:52:34 +00:00
deberg 4738ff87d6 netbsd changes 2002-01-09 17:43:28 +00:00
deberg f5cc2966a0 import freebsd smbfs code 2002-01-09 17:25:32 +00:00