Age | Commit message (Collapse) | Author |
|
|
|
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
cdminphys().
|
|
information in the TOC. The partition info is just overwritten or
rendered incomplete by readdisklabel().
Just examine the TOC to determine if the cd is audio only, i.e. it has
a valid TOC but no data tracks. In this case don't call
readdisklabel(). Much simpler code. No functional change for single
data track CD's like the install media.
ok pedro@.
|
|
1) Using cd_load_toc() instead of replicating code.
2) Using struct cd_toc and betoh32() like other parts of cd.c.
3) Restoring pre-Sept. 26 behaviour of trying to read usable disklabel
info if there is no TOC. i.e. avoid readdisklabel() only when it is an
audio-only CD. Stop abusing spoofonly.
Tested by mjc@
|
|
Add a check for ending_track < starting_track before calculating size
of TOC to read.
Tested by mjc@
|
|
bzero() all malloc'ed cd_toc structs because cd_read_toc() will only
zero as much as it is trying to read.
malloc M_TEMP memory instead of M_DEVBUF memory for the cd_toc
structs.
ok deraadt@
|
|
used.
|
|
Eliminate separate check/break from for() loop.
No functional change.
ok deraadt@
|
|
instead.
ok deraadt@
|
|
better readable. actually no binary change.
ok krw@
|
|
ok hshoexer@
|
|
sized allocation. Remove some dead code.
|
|
sd does. Prevents spurious label information from being seen on
devices that return NOT READY/UNABLE TO RECOVER TABLE-OF-CONTENTS
error (or other sense errors) for blank media. Burning cd's still
works.
ok marco@ dlg@ fgsch@ deraadt@
|
|
ILLEGAL REQUEST is correctly reported for blank media, as an
informative FreeBSD comment pointed out. Ensure the returned table of
contents is always initialized to zero. Call readdisklabel with
spoofonly = 1 when no data tracks are found.
Don't try to read the DOS label from the device if spoofonly is 1.
Only done for amd64 here. More archs to follow.
Eliminates scsi error messages when attempting to open a cd containing
blank media, as pointed out by Michael Coulter.
ok deraadt@
|
|
calculations. Same as sd.c r1.94.
|
|
fix devices not supporting TEST UNIT READY.
|
|
headers; } to just union scsi_mode_sense_buf {}. No functional change.
ok marco@
|
|
stack into malloc'd memory.
ok deraadt@
|
|
Create structures to eliminate 2048+4 magic number everywhere. Mostly
adapted from NetBSD.
tested by sturm@, beck@. ok beck@
|
|
|
|
required number of bytes, rather than a full scsi_mode_sense_buf. Some
devices (e.g. my HP SureStore DAT/24) decline to accept such oversized
transfers. Instead, force callers to fill in the data_length field in
the header and use that information to set the size of the transfer.
|
|
cd.h. Remove include of cdvar.h from cd.c. cdvar.h becomes expendable.
No functional change.
|
|
Add 'big' parameter to report which mode sense header type is being
returned. Eliminate icky pointer arithmetic, since it won't work if
only block descriptors are returned by the device.
No functional change.
|
|
going to change anything. From NetBSD.
Fixes playing music cd in ATAPI drive in USB enclosure pascoe@ is
using.
ok pascoe@.
|
|
cd_atapi into cd since code is now almost identical, and only affects
volume adjusting ioctl's. Minor side effect of allowing
cd_load_unload() attempts to scsi cd's as NetBSD does.
|
|
present. A successful open is required for ioctl's to work. Mostly
from NetBSD, partly correcting previous code cleanup error.
From deraadt@, treat MTIOCTOP+MTRETEN as CDIOCCLOSE for cd devices
(i.e. close the cd drawer).
ok deraadt@.
|
|
|
|
quiet if raw partition access tried. Be more careful with
SDEV_MEDIA_LOADED. Inspired by some NetBSD changes.
ok marco@
|
|
|
|
SC_DEBUG() spacing tweaks.
ok deraadt@
|
|
looked at by various, testing henning@ mcbride@ dan weeks
mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
|
|
(mvme68k/mvme88k) vs.c and (vax) if_le.c ok miod@
isakmpd ones ok ho@
|
|
|
|
krw@ ok
|
|
|
|
is trying to bring in.
1) Change name of SDEV_NOCDB6 to SDEV_ONLYBIG to align it with the
same quirk in NetBSD, and make it more clear what it is trying to do.
i.e. force the use of READ_BIG/WRITE_BIG commands, not suppress all
use of 6 byte CDB's.
2) Check SDEV_ONLYBIG in cd.c as well as sd.c. i.e. both places where
a choice is made to use the 6 or 10 byte versions of READ/WRITE.
3) Actually make use of the ADEV_NOTUR (No TEST UNIT READY) quirk to
suppress the emission of TEST UNIT READY commands.
4) Add some explanatory comments from NetBSD to scsiconf.h so that the
use of the quirks is made clear.
ok miod@ tdeval@ nate@
|
|
and should not be created or used as such.
This fixes some instances of both behaviours, and sets the stage for some
strcpy -> strncpy fixup.
ok tdeval@ millert@ deraadt@
|
|
(and right before the leadout track in the case of the last track). Some
CDROM's are evidentally picky about being asked to play the first frame
of the leadout.
|
|
|
|
Use increased retries number and don't ignore SCSI_IGNORE_NOT_READY
when call scsi_test_unit_ready() for cd-rom, this makes system wait
if drive is loading media.
Tested by millert@ and fgsch@; some input and ok from krw@.
Problem reported by The lord of the CD-writers
Igor Grabin <violent@death.kiev.ua>.
|
|
|
|
less confusing.
|
|
|
|
Should fix disklabel warnings on disks with no data track.
The old code was unnecessary complex too.
|
|
|
|
|
|
cd.
ok art@
|
|
allow empty CD caddies to be ejected.
Original diff from Alexander Guy. "pretty much straight from NetBSD"
Addition to allow eject (mt) to eject an empty tray.
ok csapuntz@
|