summaryrefslogtreecommitdiffstats
path: root/sys/dev/null
Commit message (Collapse)AuthorAgeFilesLines
* Fix for PR 138526.gnn2012-01-111-6/+42
| | | | | | | | | | Add the ability for /dev/null and /dev/zero to accept being set into non blocking mode via fcntl(). This brings the code into compliance with IEEE Std 1003.1-2001 as referenced in another PR, 94729. Reviewed by: jhb MFC after: 1 week
* Move the ZERO_REGION_SIZE to a machine-dependent file, as on manymdf2011-05-131-0/+2
| | | | | | | | | | | | | | | | | | architectures (i386, for example) the virtual memory space may be constrained enough that 2MB is a large chunk. Use 64K for arches other than amd64 and ia64, with special handling for sparc64 due to differing hardware. Also commit the comment changes to kmem_init_zero_region() that I missed due to not saving the file. (Darn the unfamiliar development environment). Arch maintainers, please feel free to adjust ZERO_REGION_SIZE as you see fit. Requested by: alc MFC after: 1 week MFC with: r221853
* Usa a globally visible region of zeros for both /dev/zero and the mdmdf2011-05-131-6/+11
| | | | | | | | device. There are likely other kernel uses of "blob of zeros" than can be converted. Reviewed by: alc MFC after: 1 week
* Mark /dev/zero and /dev/null as eternal.kib2010-08-061-4/+4
| | | | | In collaboration with: pho MFC after: 1 month
* Remove unneeded minor numbers from /dev/null and /dev/zero.ed2009-09-061-7/+4
|
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+2
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Use dynamic major number allocation.phk2005-02-271-3/+0
|
* Go back to the historical minor numbers. Add a module version whilemarkm2004-08-021-2/+3
| | | | | | I'm here. Asked for minor numbers by: jhb
* YA oops. Remove code that was being tested locally.markm2004-08-011-21/+0
|
* Break out the MI part of the /dev/[k]mem and /dev/io drivers intomarkm2004-08-011-9/+27
| | | | | | | | their own directory and module, leaving the MD parts in the MD area (the MD parts _are_ part of the modules). /dev/mem and /dev/io are now loadable modules, thus taking us one step further towards a kernel created entirely out of modules. Of course, there is nothing preventing the kernel from having these statically compiled.
* Do a pass over all modules in the kernel and make them return EOPNOTSUPPphk2004-07-151-0/+2
| | | | | | | | for unknown events. A number of modules return EINVAL in this instance, and I have left those alone for now and instead taught MOD_QUIESCE to accept this as "didn't do anything".
* Micro-tweaking.markm2004-06-201-7/+10
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Device megapatch 4/6:phk2004-02-211-2/+3
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Shorten the code by removing one "do-nothing" function, replacing itmarkm2003-11-011-10/+1
| | | | with nullop(), which is in kern_conf.c.
* Mark as __unused some arguments that are, erm, unused.markm2003-10-181-2/+5
|
* Return ENOIOCTL for unknown ioctls, don't use noioctl to return ENODEV.phk2003-09-271-1/+1
|
* The present defaults for the open and close for device drivers whichphk2003-09-271-4/+0
| | | | | | | | | | | | | | provide no methods does not make any sense, and is not used by any driver. It is a pretty hard to come up with even a theoretical concept of a device driver which would always fail open and close with ENODEV. Change the defaults to be nullopen() and nullclose() which simply does nothing. Remove explicit initializations to these from the drivers which already used them.
* Use __FBSDID().obrien2003-08-241-1/+3
| | | | Also some minor style cleanups.
* /dev/null and /dev/zero does not need Giantphk2003-06-241-1/+2
|
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-28/+14
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Don't use evil casts in cdevsw initialization.phk2003-03-021-5/+13
|
* Warns and lint fix. Nearly all trivial stuff.markm2003-02-271-7/+8
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Everywhere else, an argument passed to a device containing flagsmarkm2002-09-211-5/+4
| | | | is called "flags". Make it so here.
* Modernise the cdevsw WRT to (unused) kqueue.markm2002-08-021-0/+2
|
* Rename DIOCGKERNELDUMP to DIOCSKERNELDUMP as it strictly speakingphk2002-04-091-1/+1
| | | | | | is a "set" not a "get" operation. Sponsored by: DARPA & NAI Labs.
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.phk2002-04-081-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Here follows the new kernel dumping infrastructure.phk2002-03-311-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caveats: The new savecore program is not complete in the sense that it emulates enough of the old savecores features to do the job, but implements none of the options yet. I would appreciate if a userland hacker could help me out getting savecore to do what we want it to do from a users point of view, compression, email-notification, space reservation etc etc. (send me email if you are interested). Currently, savecore will scan all devices marked as "swap" or "dump" in /etc/fstab _or_ any devices specified on the command-line. All architectures but i386 lack an implementation of dumpsys(), but looking at the i386 version it should be trivial for anybody familiar with the platform(s) to provide this function. Documentation is quite sparse at this time, more to come. Details: ATA and SCSI drivers should work as the dump formatting code has been removed. The IDA, TWE and AAC have not yet been converted. Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set the device as dumpdev. To implement the "off" argument, /dev/null is used as the device. Savecore will fail if handed any options since they are not (yet) implemented. All devices marked "dump" or "swap" in /etc/fstab will be scanned and dumps found will be saved to diskfiles named from the MD5 hash of the header record. The header record is dumped in readable format in the .info file. The kernel is not saved. Only complete dumps will be saved. All maintainer rights for this code are disclaimed: feel free to improve and extend. Sponsored by: DARPA, NAI Labs
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-2/+0
| | | | the bit-bucket.
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+1
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* During a verbose boot, call the null device 'null' rather than 'null0' tojhb2000-10-061-1/+1
| | | | be more consistent with the rest of the kernel.
* Move sys/dev/nulldev to sys/dev/null to be more consistent with namingjhb2000-10-021-2/+2
| | | | under sys/dev.
* Small style change; make function names less likely to clash withmarkm2000-07-091-7/+7
| | | | existing names. "null" is too common a string; use "null_".
* New machine independant /dev/null and /dev/zero driver. This device ismarkm2000-06-251-0/+137
severely stripped down compared with its predecessor, and is measurably a _lot_ faster. Many thanks to Jeroen van Gelderen for lots of good ideas. There is still a problem with this; it is written as a mudule, and as such is theoretically unloadable. However, there is no refcounting done as I would prefer to do that a'la device_busy(9), rather than some "home-rolled" scheme. The point is pretty moot, as /dev/null is effectively compulsory. Reviewed by: dfr
OpenPOWER on IntegriCloud