summaryrefslogtreecommitdiff
path: root/sys/dev/ramdisk.c
AgeCommit message (Collapse)Author
2006-09-24Eliminate D_CHAIN, D_ECC and D_RAMDISK flags from disklabel. They wereKenneth R Westerback
not being used in the tree for anything obviously useful. Get it done early so we can find if there are non-obvious uses out there. ok deraadt@ beck@
2006-08-14Now that DEV_BSIZE is universally defined as 1 << DEV_BSHIFT, use it toKenneth R Westerback
set d_secsize instead of 1 << DEV_BSHIFT. Just for textual consistency in setting d_secsize. No functional change.
2006-08-12Setting d_secsize to DEV_BSIZE (or 1 << DEV_BSHIFT, or 512) and thenKenneth R Westerback
setting RAW_PART's p_size to d_secperunit * (d_secsize / DEV_BSIZE) is a waste of a few ops. And p_size should be in sectors anyway. Just set RAW_PART's p_size to d_secperunit to make usage consistant across the tree. Should be a no-op.
2005-06-30Do not compile RAMDISK_SERVER functionnality by default if option SMALL_KERNEL;Miod Vallat
saves roughly 512 bytes.
2004-04-03Complete 'lp.d_' to 'lp->d_' changes started with r1.24 so that ramdisk_cd andKenneth R Westerback
friends compile again. ok tdeval@.
2004-04-01Better bounds checking in strategy(), and kill the (unused) rd flagsMiod Vallat
while there. ok tdeval@ (long ago)
2004-01-14Do not fill more than the first three fields of cfdriver structures unlessMiod Vallat
necessary. No functional change.
2003-10-21typos from Tom Cosgrove;Jason McIntyre
2003-04-19Some string cleanup: sprintf -> snprintf and magic numbers to sizeofKenneth R Westerback
(remember: d_[type|pack]name do not need terminating null). Take the opportunity to introduce some paranoia and check the device name lengths to make sure they fit, with appropriate errors if not. ok tedu@ tdeval@
2003-03-03Provide a functional d_psize() function for ramdisk block devices.Miod Vallat
ok deraadt@
2002-05-23Protect biodone calls with splbio.Artur Grabowski
2002-03-14First round of __P removal in sysTodd C. Miller
2001-11-06Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.Miod Vallat
(Look ma, I might have broken the tree)
2001-10-24Use macros from sys/disklabel.h instead of custom ones with slightlyTodd C. Miller
different (and thus confusing) semantics.
2001-09-19merge vm/vm_kern.h into uvm/uvm_extern.h; art@ okMichael Shalayeff
2001-07-08Add missing call to minor() in RDLABELDEV macro.Todd C. Miller
This only worked before by luck. Fixes floppy panic in -current. Thanks to krw@ for the DDB traceback, it helped ;-)
2001-06-27zap old vmArtur Grabowski
2001-05-16No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)Hakan Olsson
1999-11-16We don't need a prototype for kmem_alloc.Artur Grabowski
1999-09-14vaddr_t/vsize_tMichael Shalayeff
1999-02-26compatibility with uvm kmem allocatorsArtur Grabowski
1998-10-03Add a "spoofonly" argument to readdisklabel() which will be used toTodd C. Miller
implement an ioctl to get a spoofed label even for disks that have a label on them.
1997-10-18avoid "no disklabel" error messagesTheo de Raadt
1997-02-06Changes to ramdisk driver to support disklabels. Work done by Theo.Dale S. Rahn
This will require changes for each machine type. changes to MAKEDEV, suggest treating rd like sd --- sd*|vnd*|ccd*|rd*) ... rd*) name=rd; blk=17; chr=17;; --- Make certain that majors and minors are correct conf.c add a entry in cdevsw for rd (previously was only in bdev) --- cdev_decl(rd); ... struct cdevsw cdevsw[] = { ... cdev_disk_init(NRD,rd), /* 17 ram disk driver*/ --- other changes to how rdconfig is called may be appropriate, it must now be configured using the "raw" parition typically 'c'.
1996-04-21partial sync with netbsd 960418, more to comeTheo de Raadt
1996-04-18NetBSD 960317 mergeNiklas Hallqvist
1996-01-12from netbsd;Theo de Raadt
New generic disk framework. Highlights: New metrics handling. Metrics are now kept in the new `struct disk'. Busy time is now stored as a timeval, and transfer count in bytes. Storage for disklabels is now dynamically allocated, so that the size of the disk structure is not machine-dependent. Several new functions for attaching and detaching disks, and handling metrics calculation. Old-style instrumentation is still supported in drivers that did it before. However, old-style instrumentation is being deprecated, and will go away once the userland utilities are updated for the new framework. For usage and architectural details, see the forthcoming disk(9) manual page.
1995-11-19from netbsd; get size of softc rightTheo de Raadt
1995-10-18initial import of NetBSD treeTheo de Raadt