freebsd-skq/sys
Kenneth D. Merry 2906da29dc Write support for the cd(4) driver.
This allows writing to DVD-RAM, PD and similar drives that probe as CD
devices.  Note that these are randomly writeable devices, not
sequential-only devices like CD-R drives, which are supported by cdrecord.

Add a new flag value for dsopen(), DSO_COMPATLABEL.  The cd(4) driver now
uses this flag instead of the DSO_NOLABELS flag.  The DSO_NOLABELS always
used a "fake" disklabel for the entire disk, provided by the caller.

With the DSO_COMPATLABEL flag, dsopen() will first search the media for a
label, and if it finds a label, it will use that label.  Otherwise it will
use the fake disklabel provided by the caller.  This provides backwards
compatibility, since we will still have labels for ISO9660 media.

It also provides new functionality, since you can now have a regular BSD
disklabel on read-only media, or on writeable media (e.g. DVD-RAM).

Bruce and I both think that we should eventually (in a few years) get
away from using disklabels for ISO9660 media, and just use the whole disk
device (/dev/cd0).  At that point disklabel handling in the cd(4) driver
could follow the "normal" model, as used in the da(4) driver.

Also, clean up the path in a couple of places in cdregister().  (Thanks to
Nick Hibma for catching that bug.)

Reviewed by:	bde
2000-10-30 07:03:00 +00:00
..
alpha Remember to decrement interrupt nesting level if leaving early 2000-10-30 04:18:54 +00:00
amd64 Remove unneeded <stddef.h> #includes. 2000-10-29 16:57:42 +00:00
boot Backout revision 1.7 which was a bad idea since it would force people 2000-10-27 09:36:34 +00:00
cam Write support for the cd(4) driver. 2000-10-30 07:03:00 +00:00
coda Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
compat Bring cpuinfo closer to what it looks like in Linux 2.2. 2000-10-25 22:38:23 +00:00
compile
conf Remove unneeded <stddef.h> #includes. 2000-10-29 16:57:42 +00:00
contrib/dev We should include <machine/stdarg.h> not <stdarg.h> 2000-10-28 08:32:43 +00:00
crypto Fix broken const'ness in declaration of sha1_loop(). 2000-10-09 18:49:14 +00:00
ddb Previous commit changing SYSCTL_HANDLER_ARGS violated KNF. 2000-07-04 11:25:35 +00:00
dev Remove unneeded <stddef.h> #includes. 2000-10-29 16:57:42 +00:00
fs Make malloc use M_ZERO in some more locations. 2000-10-29 16:14:28 +00:00
geom Avoid the modules madness I inadvertently introduced by making the 2000-09-02 19:17:34 +00:00
gnu Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
i4b Add infrastructure for Cologne Chip HFC-S PCI driver. 2000-10-26 07:00:05 +00:00
i386 Remove unneeded <stddef.h> #includes. 2000-10-29 16:57:42 +00:00
ia64 Convert all users of fldoff() to offsetof(). fldoff() is bad 2000-10-27 11:45:49 +00:00
isa Revert two experimental changes which escaped from my devel machine. 2000-10-28 06:55:12 +00:00
isofs/cd9660 Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing 2000-10-29 14:54:55 +00:00
kern Write support for the cd(4) driver. 2000-10-30 07:03:00 +00:00
libkern Fix compilation of profiled kernels by including <machine/lock.h> 2000-10-14 08:34:27 +00:00
miscfs Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
modules modules for the new sb8 and sb16 drivers 2000-10-28 19:28:49 +00:00
msdosfs Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing 2000-10-29 14:54:55 +00:00
net Add some additional message types for coming raylan driver from Duncan 2000-10-30 06:03:57 +00:00
netatalk Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netatm Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netgraph Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netinet Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netinet6 Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netipx Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
netkey Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
netnatm
netncp Make malloc use M_ZERO in some more locations. 2000-10-29 16:14:28 +00:00
netns
nfs Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
nfsclient Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
nfsserver Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
ntfs Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
nwfs Make malloc use M_ZERO in some more locations. 2000-10-29 16:14:28 +00:00
pc98 Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
pccard Make a few more mallocs use M_ZERO. 2000-10-29 16:29:05 +00:00
pci Unmask cypress ata controllers. This bug was hidden before 2000-10-29 16:27:40 +00:00
posix4
powerpc - Overhaul the software interrupt code to use interrupt threads for each 2000-10-25 05:19:40 +00:00
rpc
sys Write support for the cd(4) driver. 2000-10-30 07:03:00 +00:00
tools remove crufty exec stuff, perl is in the base system 2000-06-27 19:09:55 +00:00
ufs Move suser() and suser_xxx() prototypes and a related #define from 2000-10-29 16:06:56 +00:00
vm Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing 2000-10-29 14:54:55 +00:00
Makefile I should know better than to touch this without testing a 'make release' 2000-08-24 18:53:09 +00:00