forked from pool/systemd
6a1d711f33
- rework patch: 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch - udev: use unique names for temporary files created in /dev. add: 1022-udev-use-unique-names-for-temporary-files-created-in.patch - cdrom_id: add data track count for bad virtual drive. add: 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch - rework patch: 1020-usb_id-some-strange-devices-have-a-very-bogus-or-strage-serial.patch - udev: use unique names for temporary files created in /dev. add: 1022-udev-use-unique-names-for-temporary-files-created-in.patch - cdrom_id: add data track count for bad virtual drive. add: 1023-cdrom_id-add-data-track-count-for-bad-virtual-drive.patch OBS-URL: https://build.opensuse.org/request/show/155319 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=344
52 lines
1.9 KiB
Diff
52 lines
1.9 KiB
Diff
From a0ec302b9309bc56f6bed6162e47ad6c27165747 Mon Sep 17 00:00:00 2001
|
|
From: Harald Hoyer <harald@redhat.com>
|
|
Date: Tue, 12 Feb 2013 15:19:38 +0100
|
|
Subject: [PATCH] cdrom_id: add data track count for bad virtual drive
|
|
implementations
|
|
Organization: SUSE Linux
|
|
|
|
/# /lib/udev/cdrom_id --debug /dev/sr0
|
|
probing: '/dev/sr0'
|
|
INQUIRY: [AMI ][Virtual CDROM ][1.00]
|
|
GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h
|
|
drive is pre-MMC2 and does not support 46h get configuration command
|
|
trying to work around the problem
|
|
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
|
|
no current profile, but disc is present; assuming CD-ROM
|
|
READ TOC: len: 12, start track: 1, end track: 1
|
|
last track 1 starts at block 0
|
|
READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h
|
|
ID_CDROM=1
|
|
ID_CDROM_MEDIA=1
|
|
ID_CDROM_MEDIA_CD=1
|
|
|
|
What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger
|
|
blkid in /lib/udev/rules.d/60-persistent-storage.rules
|
|
|
|
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*",
|
|
ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*",
|
|
ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
|
|
IMPORT{builtin}="blkid --noraid"
|
|
|
|
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
|
---
|
|
src/udev/cdrom_id/cdrom_id.c | 2 ++
|
|
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
|
|
index 1056536..b659cc3 100644
|
|
--- a/src/udev/cdrom_id/cdrom_id.c
|
|
+++ b/src/udev/cdrom_id/cdrom_id.c
|
|
@@ -513,6 +513,8 @@ static int cd_profiles_old_mmc(struct udev *udev, int fd)
|
|
if (cd_media == 1) {
|
|
log_debug("no current profile, but disc is present; assuming CD-ROM\n");
|
|
cd_media_cd_rom = 1;
|
|
+ cd_media_track_count = 1;
|
|
+ cd_media_track_count_data = 1;
|
|
return 0;
|
|
} else {
|
|
log_debug("no current profile, assuming no media\n");
|
|
--
|
|
1.7.7
|
|
|