aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* Remove LKM support, src/lkm that built it is gone and it never worked as anPeter Wemm1999-01-171-35/+1
| | | | | | | LKM anyway. It does work as a preloaded KLD module though. Notes: svn path=/head/; revision=42764
* Avoid warning for unused variable.Eivind Eklund1999-01-112-4/+4
| | | | Notes: svn path=/head/; revision=42539
* Don't pass unused unused timestamp args to UFS_UPDATE() or wasteBruce Evans1999-01-0712-82/+42
| | | | | | | | time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes(). Notes: svn path=/head/; revision=42374
* UFS_UPDATE() takes a boolean `waitfor' arg, so don't pass it the valueBruce Evans1999-01-062-2/+2
| | | | | | | | | MNT_WAIT when we mean boolean `true' or check for that value not being passed. There was no problem in practice because MNT_WAIT had the magic value of 1. Notes: svn path=/head/; revision=42354
* Ifdefed conditionally used simplock variables.Bruce Evans1999-01-021-1/+3
| | | | Notes: svn path=/head/; revision=42248
* PR: kern/8819Matthew Dillon1998-12-131-55/+55
| | | | | | | | Trivial change of macro name from DEBUG to AWE_DEBUG to avoid conflict with kernel DEBUG option. Notes: svn path=/head/; revision=41725
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-076-30/+16
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()Archie Cobbs1998-12-041-1/+1
| | | | | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com> Notes: svn path=/head/; revision=41514
* Fixed a misspelling of boolean true as MNT_WAIT.Bruce Evans1998-11-152-2/+2
| | | | Notes: svn path=/head/; revision=41174
* Finished updating module event handlers to be compatible withBruce Evans1998-11-151-2/+2
| | | | | | | modeventhand_t. Notes: svn path=/head/; revision=41173
* add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE()Peter Wemm1998-11-101-1/+2
| | | | Notes: svn path=/head/; revision=41059
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagsPeter Wemm1998-10-316-14/+12
| | | | | | | rather than abusing the list next pointer with a magic number. Notes: svn path=/head/; revision=40790
* error return assignment was less than ideal. Fix the part that causedPeter Wemm1998-10-292-4/+4
| | | | | | | | warnings to be the same as the ffs code. Previously, any error from the UFS_UPDATE() call was lost (I think). Notes: svn path=/head/; revision=40721
* Use vtruncbuf() to clean out cached blocks on a file shorten rather thanPeter Wemm1998-10-292-6/+8
| | | | | | | | the more expensive vinvalbuf(), based on the FFS version of the same routine. I don't have any ext2fs filesystems to test this on. Notes: svn path=/head/; revision=40718
* Oops, the redundant tests for major numbers weren't redundant here.Bruce Evans1998-10-272-4/+6
| | | | | | | | | | They checked for the magic major number for the "device" behind mfs mount points. Use a more obvious check for this device. Debugged by: Andrew Gallatin <gallatin@cs.duke.edu> Notes: svn path=/head/; revision=40672
* Removed redundant bitrotted checks for major numbers instead of updatingBruce Evans1998-10-262-8/+4
| | | | | | | them. Notes: svn path=/head/; revision=40660
* Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rottedBruce Evans1998-10-252-2/+4
| | | | | | | | when bdevsw[] became sparse. We still depend on magic to avoid having to check that (v_rdev) device numbers in vnodes are not NODEV. Notes: svn path=/head/; revision=40651
* Initialize earlier (ie: before npx) in case it makes any difference.Peter Wemm1998-10-181-4/+8
| | | | | | | | Print a message when it attaches to pmath_emulate if bootverbose so that we can be sure it's online. Notes: svn path=/head/; revision=40504
* OOPS!Peter Wemm1998-10-181-2/+2
| | | | | | | | | Supply the moduledata handle rather than the event dispatcher function. This should explain the panic on boot problem that's been discussed in -current at the moment. Both machines had GNU_MATH_EMULATE. Notes: svn path=/head/; revision=40501
* *gulp*. Jordan specifically OK'ed this..Peter Wemm1998-10-161-9/+29
| | | | | | | | | | | This is the bulk of the support for doing kld modules. Two linker_sets were replaced by SYSINIT()'s. VFS's and exec handlers are self registered. kld is now a superset of lkm. I have converted most of them, they will follow as a seperate commit as samples. This all still works as a static a.out kernel using LKM's. Notes: svn path=/head/; revision=40435
* Fixed bloatage of `struct inode'. We used 5 "spare" fields for ext2fs,Bruce Evans1998-10-138-16/+16
| | | | | | | | | | | | | | | | | but when i_effnlink was added to support soft updates, there was only room for 4 spares. The number of spares was not reduced, so the inode size became 260 (on i386's), or 512 after rounding up by malloc(). Use one spare field in `struct dinode' instead of the 5th spare field in the inode and reduced to 4 spares in the inode so that the size is 256 again. Changed the types of the spares in the inode from int to u_int32_t so that the inode size has more chance of being <= 256 under other arches, and downdated ext2fs to match (it was broken to use ints before rev.1.1). Notes: svn path=/head/; revision=40304
* Quick fix for not being able to sync all the buffers in boot() ifBruce Evans1998-10-034-16/+20
| | | | | | | | | | | | | | | | an ext2fs file system is mounted. The soft update changes added a check for B_DELWRI buffers. This exposed the complete brokenness of the previous quick fix for failing syncs (PR 3571, committed on 1997/08/04). Use a new buffer flag B_DIRTY and don't abuse B_DELWRI. B_DIRTY buffers are still written too late, as broken in the previous fix. This is fairly harmless, because B_DIRTY is only used for bitmap buffers and fsck.ext2 can fix up the bitmaps perfectly. Fixed a race in ULCK_BUF() (bremfree() was outside of the splbio() section). Notes: svn path=/head/; revision=39924
* Fixed initialization of new inodes. ext2fs doesn't clear inodes whenBruce Evans1998-09-292-2/+6
| | | | | | | | | they are deleted, so inodes must be cleared when they are reused, but we didn't clear the indirect blocks. This caused serious filesystem corruption. Notes: svn path=/head/; revision=39753
* Updated ext2_reload() and ext2_sync(). Locking was broken, and MNT_LAZYBruce Evans1998-09-262-84/+126
| | | | | | | | | | | | syncs weren't optimized properly (they probably still aren't, but are bug for bug compatible with ffs). These fixes are mostly academic, since ext2fs is too broken to mount read-write (it apparently doesn't clear indirect blocks). Obtained from: mostly from Lite2 Notes: svn path=/head/; revision=39678
* Fixed missing newlines in messages in ext2_check_descriptors().Bruce Evans1998-09-262-16/+24
| | | | | | | | | | Fixed vnode and memory leaks after an unlikely (?) error in ext2_mountfs(). Fixed an unconditional memory leak in ext2_unmount(). Notes: svn path=/head/; revision=39671
* Fixed clean flag handling:Bruce Evans1998-09-264-20/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixes for bugs not shared with ffs: - don't mount unclean filesystems rw unless forced to. - accept EXT2_ERROR_FS (treat it like !EXT2_VALID_FS). We still don't set this or honour the maximal mount count. - don't attempt to print the name of the mount point when mounting an unclean file system, since the name of the previous mount point is unknown and the name of the current mount point is still "". Fixes for bugs shared with ffs until recently: - don't set the clean flag on unmount of an initially-unclean filesystem that was (forcibly) mounted rw. - set the clean flag on rw -> ro update of a mounted initially-clean filesystem. - fixed some style bugs (mostly long lines). The fixes are slightly simpler than for ffs, because the relevant on-disk state is not a simple boolean variable, and the superblock has a core-only extension. Obtained from: parts from ffs_vfsops.c, parts from NetBSD Notes: svn path=/head/; revision=39670
* Fixed the usual missing permissions checks in mount(). As for cd9660,Bruce Evans1998-09-092-2/+70
| | | | | | | | | the damage was limited by the default of 0 for vfs.usermount. Obtained from: Lite2 via the -current ffs_vfsops.c Notes: svn path=/head/; revision=39028
* Don't forget to initialize the inode lock. This bug causedBruce Evans1998-09-092-0/+2
| | | | | | | | | | | | surprisingly few problems. Most fields were initialized to the correct values by bzero(), but lk_prio was 0 instead of PINOD (=8), the lk_wmsg was NULL instead of "ext2in", and lk_lockholder was 0 instead of -1. Obtained from: Lite2 via the -current ffs_vfsops.c Notes: svn path=/head/; revision=38998
* Support compiling with `gcc -pedantic' (don't use hard newlines inBruce Evans1998-09-092-38/+40
| | | | | | | (asm) string constants). Notes: svn path=/head/; revision=38997
* Removed statically configured mount type numbers (MOUNT_*) and allBruce Evans1998-09-072-6/+6
| | | | | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct. Notes: svn path=/head/; revision=38909
* Fixed printf format errors. Only one left in LINT on i386's.Bruce Evans1998-08-242-21/+17
| | | | Notes: svn path=/head/; revision=38505
* Added D_TTY to the cdevswitch flags for all tty drivers. This is requiredBruce Evans1998-08-232-16/+18
| | | | | | | | | | | | for the Lite2 fix for always returning EIO in dead_read(). Cleaned up the cdevswitch initializers for all tty drivers. Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes. Notes: svn path=/head/; revision=38485
* Quick fix for breakage of read clustering on non-IDE drives. ReadBruce Evans1998-08-182-4/+4
| | | | | | | | | | | | | | | | | clustering is obsolescent technology so hardly anyone noticed. On a DORS 32160 SCSI drive with 4 tags, read clustering makes very little difference even for huge sequential reads. However, on a ZIP SCSI drive with 0 tags, the minimum overhead per block is about 40 msec, so very large clusters must be used to get anywhere near the maximum transfer rate. Using clusters consisting of 1 8K block reduces the transfer rate to about 250K/sec. Under msdosfs, missing read clustering is normal and a cluster size of 1 512 byte block reduces the transfer rate to about 25K/sec. Broken in: rev.1.18 Notes: svn path=/head/; revision=38418
* Use [u]intptr_t instead of [u_]long for casts between pointers andBruce Evans1998-08-166-22/+28
| | | | | | | integers. Don't forget to cast to (void *) as well. Notes: svn path=/head/; revision=38354
* Use offsetof() to avoid some casts from pointers to integers (of aBruce Evans1998-08-151-1/+3
| | | | | | | possibly different size). Notes: svn path=/head/; revision=38341
* Remove some #if 0'd and commented-out code.Brian Somers1998-08-121-34/+2
| | | | | | | Fix a COMPAT_43 type. Notes: svn path=/head/; revision=38294
* "The releaseing of the reference and lock is not temporary and belongsMike Smith1998-08-122-2/+0
| | | | | | | | | | where it is. The reference and lock(s) are acquired just above the code in VREF() and relookup()." Submitted by: Michael Hancock <michaelh@cet.co.jp> Notes: svn path=/head/; revision=38292
* Synced with dgb.c. Important changes from 1.29 (ioctl handlingBruce Evans1998-08-121-52/+27
| | | | | | | | | | | | | | | | | was broken), 1.30 (COMPAT_43 option header was missing), 1.31 (DEVFS option header was missing), 1.33 (garbage pointers were followed in debugging code). Cosmetic changes from 1.27, 1.32, 1.36, 1.37. Of course, the DEVFS code didn't even compile. Fixed. Not tested. Forgotten by: brian This file should not exist. It is the same as dgb.c except for lots of renamed variables, about 250 lines removed, and only about 100 lines of real differences. Notes: svn path=/head/; revision=38285
* Fixed printf format errors.Bruce Evans1998-08-121-7/+6
| | | | | | | This file is disgusting. Notes: svn path=/head/; revision=38284
* Add Id keywordBrian Somers1998-08-053-2/+9
| | | | Notes: svn path=/head/; revision=38131
* Add driver dgm - for the Digiboard PC/XemBrian Somers1998-08-044-0/+7023
| | | | | | | | Submitted by: "IBS / Andre Oppermann" <andre@pipeline.ch> DEVFS additions: brian Notes: svn path=/head/; revision=38107
* Fixed printf format errors.Bruce Evans1998-07-302-4/+4
| | | | Notes: svn path=/head/; revision=37976
* add anti-panic workaround from chris radek (cradek@in221.inetnebr.com)Julian Elischer1998-07-302-0/+4
| | | | | | | Not sure why this is needed but but does stop crashes. Notes: svn path=/head/; revision=37966
* Fixed printf format errors.Bruce Evans1998-07-116-8/+12
| | | | Notes: svn path=/head/; revision=37555
* Catch a few corner cases where FreeBSD differs enough from BSD 4.4 toJulian Elischer1998-07-082-2/+4
| | | | | | | | confuse Soft updates.. Should solve several "dangling deps" panics. Notes: svn path=/head/; revision=37490
* VOP_STRATEGY grows an (struct vnode *) argumentJulian Elischer1998-07-044-6/+6
| | | | | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org> Notes: svn path=/head/; revision=37384
* Sync timestamp changes for inodes of special files to disk as lateBruce Evans1998-07-034-16/+18
| | | | | | | | | | | | | | | | | as possible (when the inode is reclaimed). Temporarily only do this if option UFS_LAZYMOD configured and softupdates aren't enabled. UFS_LAZYMOD is intentionally left out of /sys/conf/options. This is mainly to avoid almost useless disk i/o on battery powered machines. It's silly to write to disk (on the next sync or when the inode becomes inactive) just because someone hit a key or something wrote to the screen or /dev/null. PR: 5577 Previous version reviewed by: phk Notes: svn path=/head/; revision=37363
* Centralized in-core inode update. Update the in-core inode directlyBruce Evans1998-07-032-32/+8
| | | | | | | | | | | in ufs_setattr() so that there is no need to pass timestamps to UFS_UPDATE() (everything else just needs the current time). Ignore the passed-in timestamps in UFS_UPDATE() and always call ufs_itimes() (was: itimes()) to do the update. The timestamps are still passed so that all the callers don't need to be changed yet. Notes: svn path=/head/; revision=37362
* Fixed (?) races in mark_buffer_dirty(). We abuse the buffer cacheBruce Evans1998-06-212-6/+12
| | | | | | | | | | | | | | | | | by hacking on locked buffers without getblk()ing them, and we didn't even use splbio() to prevent biodone() changing the buffer underneath use when a write completes. I think there was no problem in practice on i386's because the operations on b_flags and numdirtybufs happen to be atomic. We still depend on biodone()'s operations on b_flags not interfering with ours. I think there is only interference for B_ERROR, and this is harmless because errors for async writes are ignored anyway. Don't use mark_buffer_dirty() except for superblock-related metadata. It was used in just one case where ordinary BSD buffering is more natural. Notes: svn path=/head/; revision=37103
* Removed unused function ll_w_block(). It has always had races dueBruce Evans1998-06-214-38/+0
| | | | | | | | | | | to not using splbio(), and has rotted a little. The races were probably harmless in practice because this function was only used for superblock updates, and separate superblock updates are probably prevented from running into each other by doing part of the update synchronously. Notes: svn path=/head/; revision=37102