Conversation
Only `OsError` was used to represent MMC errors. Introduce `MmcError`, which also covers MMC errors by including sense data.
There are two major types of drivers in Cdio. - OS - Images Thus, rather than have a generic `new()` method with multiple (unused) initialization options, have two methods `with_device()` and `with_image()`. This commit introduces `with_device()`.
new() constructor with a specialized with_device() one for the Cdio typeCdio
| /// Generic information describing an exception. | ||
| pub sense_key: SenseKey, | ||
|
|
||
| /// Additional Sense Code indicates further information related |
There was a problem hiding this comment.
| /// Additional Sense Code indicates further information related | |
| /// Additional Sense Code (ASC) indicates further information related |
| /// to the exception reported by `sense_key`. | ||
| pub asc: u8, | ||
|
|
||
| /// Additional Sense Code Qualifier indicates detailed information related |
There was a problem hiding this comment.
| /// Additional Sense Code Qualifier indicates detailed information related | |
| /// Additional Sense Code Qualifier (ASCQ) indicates detailed information related |
| /// Sense Key Specific indicates additional information about the exception. | ||
| pub sks: [u8; 3], | ||
|
|
||
| /// Additional Sense Bytes may contain vendor specific data that further |
There was a problem hiding this comment.
In https://www.13thmonkey.org/documentation/SCSI/x3_304_1997.pdf I see do not see "Additional Sense Bytes" mentioned, although I do see "additional sense code" mentioned. Is this the same thing?
More generally, some of these fields like asc and ascq correspond very closely to the names used in many versions of a standard (including the one we are focusing on): ASC and ASCQ. But something like ili or Incorrect length indicator I am having a hard time finding matching terms in a specification.
How do we make it clear in the comments which terms are exact and which terms are our terminology for a concept that might not be spelled out with a particular term in the specification? And for the exact terms, where would I go in a spec to understand that an ASCQ is u8 (or even just 8 bits since that's probably all the standard is going to indicate)?
There are two major types of drivers in libcdio.
Thus, rather than have a generic
new()method with multiple (unused)initialization options, have two methods
with_device()andwith_image().This PR introduces
with_device(), which opens theCdioobject with both read and write flags.