If we are running udevd from a LiveCD or ISO image, it can happen that
udevd wont find the cd/dvd in time, causing a failure.

I've attached the patch which seems to fix the issue.

-- 
Robert Milasan

L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmila...@suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402  6FE7 2F64 167C 1909 6D1A
>From 37ff27dcd84dd835b24444e148b86044c3ad5fd8 Mon Sep 17 00:00:00 2001
From: Robert Milasan <rmila...@suse.com>
Date: Wed, 18 Jun 2014 15:35:27 +0200
Subject: [PATCH] udevd: ignore cd/dvd devices in synthesize_change as it can causes
 issue when udev is running from an ISO image.

Signed-off-by: Robert Milasan <rmila...@suse.com>
---
 src/udev/udevd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index aed1149..56cf7ea 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -741,7 +741,8 @@ static int synthesize_change(struct udev_device *dev) {
 
         if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
             streq_ptr("disk", udev_device_get_devtype(dev)) &&
-            !startswith(udev_device_get_sysname(dev), "dm-")) {
+            !startswith(udev_device_get_sysname(dev), "dm-") &&
+            !startswith(udev_device_get_sysname(dev), "sr")) {
                 bool part_table_read = false;
                 bool has_partitions = false;
                 int fd;
-- 
1.8.4.5

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to