0f111f
From fdf6b233df960e6903c62b86735d86c59d967d12 Mon Sep 17 00:00:00 2001
0f111f
From: Tomas Bzatek <tbzatek@redhat.com>
0f111f
Date: Fri, 19 Jun 2020 19:12:07 +0200
0f111f
Subject: [PATCH] udiskslinuxblock: Fix fstab records matching by needle
0f111f
0f111f
Apparently mnt_fs_match_options() is not suitable for this use case.
0f111f
---
0f111f
 src/udiskslinuxblock.c | 5 ++++-
0f111f
 1 file changed, 4 insertions(+), 1 deletion(-)
0f111f
0f111f
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
0f111f
index 888ec634..d5be8e4c 100644
0f111f
--- a/src/udiskslinuxblock.c
0f111f
+++ b/src/udiskslinuxblock.c
0f111f
@@ -575,7 +575,10 @@ find_fstab_entries (UDisksDaemon     *daemon,
0f111f
         }
0f111f
       else if (needle != NULL)
0f111f
         {
0f111f
-          if (mnt_fs_match_options (fs, needle) == 0)
0f111f
+          const char *opts;
0f111f
+
0f111f
+          opts = mnt_fs_get_options (fs);
0f111f
+          if (! opts || g_strstr_len (opts, -1, needle) == NULL)
0f111f
             continue;
0f111f
         }
0f111f
 
0f111f
-- 
0f111f
2.26.2
0f111f