Make Block:PreferredDevice work for partitions of RAID arrays
authorDavid Zeuthen <zeuthen@gmail.com>
Thu, 13 Sep 2012 22:58:40 +0000 (18:58 -0400)
committerDavid Zeuthen <zeuthen@gmail.com>
Thu, 13 Sep 2012 22:58:40 +0000 (18:58 -0400)
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
src/udiskslinuxblock.c

index 10b20ae..5038e78 100644 (file)
@@ -828,7 +828,7 @@ udisks_linux_block_update (UDisksLinuxBlock        *block,
             md_name_dev_file = g_strdup_printf ("/dev/md/%s", md_name);
           for (n = 0; symlinks != NULL && symlinks[n] != NULL; n++)
             {
-              if (g_strcmp0 (symlinks[n], md_name_dev_file) == 0)
+              if (g_str_has_prefix (symlinks[n], md_name_dev_file))
                 {
                   md_name_dev_file_as_symlink = symlinks[n];
                 }