From ddee64a5972cd77e7cd956f89dd909792805a679 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Tue, 16 Oct 2012 11:50:55 -0400 Subject: [PATCH] Don't count /dev/md* devices with bogus UUIDs as MD-RAID arrays For example, if you use the FAULTY personality there is no UUID and we shouldn't present the device as a RAID array as it really isn't one. Signed-off-by: David Zeuthen --- src/udiskslinuxprovider.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udiskslinuxprovider.c b/src/udiskslinuxprovider.c index 7b752bb..97862d3 100644 --- a/src/udiskslinuxprovider.c +++ b/src/udiskslinuxprovider.c @@ -509,8 +509,8 @@ handle_block_uevent_for_mdraid_with_uuid (UDisksLinuxProvider *provider, daemon = udisks_provider_get_daemon (UDISKS_PROVIDER (provider)); sysfs_path = g_udev_device_get_sysfs_path (device); - /* if uuid is NULL, consider it a remove event */ - if (uuid == NULL) + /* if uuid is NULL or bogus, consider it a remove event */ + if (uuid == NULL || g_strcmp0 (uuid, "00000000:00000000:00000000:00000000") == 0) action = "remove"; if (g_strcmp0 (action, "remove") == 0) -- 2.7.4