IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Commit cf2205a fixed the media status for fresh DVD-RW in restricted overwrite
mode, but missed a detail: We should not report the ID_CDROM_MEDIA_SESSION_NEXT
property either, since in that mode you can never append tracks/sessions; this
just works in sequential mode.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Fresh DVD-RW in restricted overwite mode reports itself as "appendable"; change
it to "blank" to make it consistent with what gets reported after blanking, and
what userspace expects.
For the exotic case where some uses multi-track recording on a DVD-RW in
sequential mode, we need to tell apart sequential and restricted overwrite
modes, so keep separate states for them internally.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Extend the DVD+RW/DVD-RAM check in commit 1ef6c9e to also cover DVD-RW, since
in "restricted overwrite" mode they behave similar to DVD+RW.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Those do not yet support the 0x46 "GET CONFIGURATION" support. If we have
those, fall back to the 0x51 "READ DISC INFORMATION" call. This can only
differentiate between CD-RW and CD-R, but first that's better than a complete
detection failure, and second, those old drives likely don't support more
modern media in the first place.
https://launchpad.net/bugs/502143
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
Once formatted, DVD+RW and DVD-RAM discs are always reported "complete" by the
drive. Check the if the Volume Descriptor or Volume Descriptor Anchor sectors
are empty, and if so, set the status to blank. If the disc is unformatted the
blank status is maintained and no reads are issued. If the disc is formatted and
read command fails, the status remains set to complete to avoid accidental
blanking.
Bug-Ubuntu: https://launchpad.net/bugs/581925
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
On Sat, Apr 17, 2010 at 18:26, Mike Brudevold <mike@brudevold.com> wrote:
> My CD-RW drive experiences a problem in that it automatically closes
> after opening if there is media in the drive. This only happens if
> there was media in the drive when it was last closed (an empty drive
> stays open).
...
> cd_profiles: current profile 0x02
> cd_profiles: profile 0x02 <ignored>
...
Do not pretend to have a media, when we receive a profile like 0x02,
which just means "Removable disk".
Thanks to Mike Brudevold for the initial patch.
Blank CDs do not have a TOC, thus will fail cd_media_toc() (at least with the
"Do not ignore errors from scsi_cmd_run()" fix). Thus probe the media state
first, so that we can properly detect blank media.
scsi_cmd_run() can return positive error messages if we have CHECK_CONDITION
set and get the error code from the SCSI command result. So check the result
for non-zero, not for being negative.
This should fix another cause for "phantom" media in empty CD-ROM drives.
Thanks to Mike Brudevold <mike@brudevold.com> for spotting this!
https://launchpad.net/bugs/562978
Commit 5c6954f is actually a no-op, since static variables are already zero'ed
by default anyway (but we keep it for clarity). The real difference was that a
build with -O0 wor while a build with -O2 didn't.
Turns out that some ioctls do not actually touch the result buffer in some
cases, so we need to zero the result buffers to avoid interpreting random da as
CD properties.
https://launchpad.net/bugs/559723https://launchpad.net/bugs/561585
In cases where cdrom_id does not go through the entire code path and one of the
probing functions returns -1 or exits early, the remaining variables were never
initialized. This caused effects like "phantom" audio CDs on empty drives, or
bogus data like ID_CDROM_MEDIA_TRACK_COUNT=22528.
Initialize the variables right away to avoid that.
Bug-Ubuntu: https://launchpad.net/bugs/559723
We might fight about the device with polling processes, or other
users who probe the device. Retry a few times if the other one goes
away in the meantime.
Based on a patch from Harald Hoyer.
Even when there is no medium in the drive, we should still check the
profiles supported by the drive. Otherwise we fail to detect things
like Blu-ray drives. See
https://bugzilla.gnome.org/show_bug.cgi?id=600273
for more information.
Signed-off-by: David Zeuthen <davidz@redhat.com>
Fix spelling in docbook comments, code comments, and a local variable
name. Thanks to "ispell -h" for docbook HTML and "scspell" for source
code.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
This is a 12 track audio CD with additional data session:
$ extras/cdrom_id/cdrom_id /dev/dvd
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RW=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_MEDIA_CD=1
ID_CDROM_MEDIA_STATE=complete
ID_CDROM_MEDIA_HAS_AUDIO=1
ID_CDROM_MEDIA_SESSION_COUNT=2
ID_CDROM_MEDIA_TRACK_COUNT=13
ID_CDROM_MEDIA_SESSION_LAST_OFFSET=444508160
We never used any of the libsysfs convenience features. Here we replace
it completely with 300 lines of code, which are much simpler and a bit
faster cause udev(d) does not open any syfs file for a simple event which
does not need any parent device information.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
After beeing hit by proprietary applications which statically
link the LGPL'd libusb, which needs a patch to reflect the recent
kernel changes, I decided not to provide LGPL code anymore.
Signed-off-by: Kay Sievers <kay.sievers@suse.de>