Commit Graph

396 Commits

Author SHA1 Message Date
gdt
7db024f8e7 When mounting an MSDOS fileysystem, do not require that bytes 252 and
253 of the superblock be zero.  Searching the net failed to find any
justification for checking these bytes; all available references say
that they are part of the boot code and not BOOTSIG2 and BOOTSIG3.

Modify the MSDOS 7.1 bootsector definition to have 420 bytes of boot
code and no BOOTSIG[23], rather than 418 bytes of boot code, to follow
available references and apparent Windows practice.  A test build
showed that these defines are not used other than in the check removed
by this commit.

Patch tested on netbsd-3, and enabled mounting of a 4 GB CF formatted
under Windows XP and then in a digital camera.  The CF was previously
unmountable.

Concept approved on tech-kern by christos@ and martin@.
2006-08-14 14:06:26 +00:00
reinoud
177a68d51b Fix comment; it stated a mimimum of 128 translations duh! a maximum it is! 2006-08-11 23:15:30 +00:00
reinoud
9e6b675112 Fix panic on badly or curruptly formatted discs due to an oddity in the
error handling chain.

If NetBSD 4.0 is allready branched at this time this ought to be pulled up.
2006-08-10 12:39:56 +00:00
reinoud
81e6c818c1 The local variable `index' seems shadowing an inbuild gcc variable (???)
when compiling from userland (kernel ok) so rename the variable to Index to
avoid the confusing warning.
2006-08-10 12:26:44 +00:00
ad
f474dceb13 Use the LWP cached credentials where sane. 2006-07-23 22:06:03 +00:00
martin
a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
reinoud
b1b70c855b Fixing a bad case of walking/writing out of allocated space.... the
allocated space was 2048 bytes, but when adding 1024 to the variable
`unix_name' to split the allocated space in half it effectively starts just
OUTSIDE the allocated space. This ought to fix memory corruption bugs when
using UDF.

This is a routine to revisit one day.
2006-07-09 13:58:47 +00:00
martin
6bfe6be406 Make it compile on 64 bit machines 2006-07-06 21:55:06 +00:00
martin
931985243c Redo previous differently - just use time_second.
Pointed out by Frank Kardel.
2006-07-01 10:12:36 +00:00
martin
c627e877cf Make it compile post time-counter merge 2006-07-01 08:42:39 +00:00
tron
a0d2802c69 Make this compile again. 2006-06-20 09:17:14 +00:00
christos
18b73e414c Don't allocate too much stuff on the stack. 2006-06-20 03:22:12 +00:00
christos
0c1391f078 remove ; from }; 2006-06-12 00:20:21 +00:00
christos
06595cb85e stack polics: Don't allocate 4K on the stack.
remove ; from };
2006-06-12 00:18:06 +00:00
kardel
de4337ab21 merge FreeBSD timecounters from branch simonb-timecounters
- struct timeval time is gone
  time.tv_sec -> time_second
- struct timeval mono_time is gone
  mono_time.tv_sec -> time_uptime
- access to time via
	{get,}{micro,nano,bin}time()
	get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
  Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
  NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
yamt
725fa55be5 hide more by ifdef _KERNEL. 2006-05-27 09:12:31 +00:00
yamt
fa971123c3 revive copyright notice for the code derived from libc/locale/utf2.c.
i've asked jdolecek@ about this, but got no reply.
2006-05-20 08:28:27 +00:00
yamt
ad696ab2dc don't try to dereference kauth_cred_t. 2006-05-15 12:51:21 +00:00
yamt
240883e159 include kauth.h for NOCRED. 2006-05-15 11:16:16 +00:00
christos
641b7ad824 More kauth fallout. 2006-05-15 01:29:02 +00:00
christos
fc6d984beb kauth fallout 2006-05-15 00:05:16 +00:00
elad
fc9422c9d9 integrate kauth. 2006-05-14 21:31:52 +00:00
he
355013fbd7 Don't use MALLOC_DECLARE() unless _KERNEL is defined.
Fixes build problem of usr.bin/fstat/ for vax.
2006-05-14 12:25:11 +00:00
mrg
e012cb30a7 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-11 01:12:21 +00:00
mrg
79652075f7 ntfs_runtovrun takes u_int8_t * not caddr_t 2006-05-11 01:11:11 +00:00
christos
93f1cb3704 Do the count check after we process getargs. 2006-04-28 19:17:45 +00:00
snj
d97db3840b s/allready/already/ 2006-04-25 02:19:31 +00:00
christos
5da80a50f2 Coverity CID 1138: Add KASSERT before deref. 2006-04-15 04:06:03 +00:00
christos
4a420185b2 Coverity CID 1197: Add KASSERT before deref. 2006-04-15 04:02:40 +00:00
christos
daeb76efcb Coverity CID 1135: Add KASSERT before deref. 2006-04-15 04:01:41 +00:00
christos
2ce6f7c5c6 Coverity CID 1093: Fix NULL deref. 2006-04-15 03:59:23 +00:00
christos
03372c0db6 Coverity CID 1001: Avoid NULL deref. 2006-04-15 03:56:25 +00:00
christos
9e36ae3b49 Coverity CID 839: Add KASSERT before deref. 2006-04-15 02:58:12 +00:00
christos
f16f3462cc Coverity CID 838: Add KASSERT before deref. 2006-04-15 02:56:51 +00:00
christos
be213d0c34 Coverity CID 2503: Remove bogus uninitialized deref. 2006-04-15 02:55:06 +00:00
christos
ceeda7c0ed Coverity CID 721: Add KASSERT since error != 0 conditions all returned, and
ifdef out dead code.
2006-04-15 02:53:49 +00:00
christos
9071fc0f28 Coverity CID 2508: Initialize variable 2006-04-15 02:44:16 +00:00
christos
56ef669e31 Coverity CID 2863: Check for NULL before freeing. 2006-04-15 02:42:08 +00:00
christos
41d5f0d550 Coveriry CID 733: Remove dead code. 2006-04-14 22:05:07 +00:00
christos
1c2c11fc00 Remove dead code. 2006-04-14 22:03:18 +00:00
christos
986cf947f1 Coverity CID 715: Remove dead code. 2006-04-14 22:00:14 +00:00
christos
5cf38f035b Strip the chrooted portion of the path from the reported pty path. Reported
and tested by Lasse Kliemann. Thanks!
2006-04-13 17:44:24 +00:00
xtraeme
0998485b9d make this build again (initiliaze ntmp). 2006-04-11 16:57:47 +00:00
christos
139332cff1 Coverity CID 2860: Free malloced resources on mount error. 2006-04-11 14:12:53 +00:00
riz
9f6ad5fff1 Swap the order of the tf_gen and tf_id members of struct tmpfs_fid,
since tf_id needs 8-byte alignment on some architectures (like amd64).
struct tmpfs_fid now fits in 16 bytes on amd64 again.
OK matt@
2006-03-31 20:27:49 +00:00
martin
625f1bbe61 Restrict generation numbers to 32bit values - we would have had to bump
_VFS_MAXFIDSZ to 24 otherwise for 64bit archs.
2006-03-26 20:18:58 +00:00
christos
f8912e4424 PR/32986: Kouichirou Hiratsuka: Don't proceed with unmounting the filesystem
if vflush failed. Thank to Jeff Ito for adopting a similar fix from FreeBSD.
2006-03-20 19:54:15 +00:00
christos
5a57baa413 don't use MALLOC with a non-constant size; use malloc instead. 2006-03-17 23:29:07 +00:00
christos
bd047b110f remove trailing newlines 2006-03-05 16:55:44 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00