[gnome-disk-utility/gnome-3-24] Fix unmounting and probing of mounted volumes
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/gnome-3-24] Fix unmounting and probing of mounted volumes
- Date: Fri, 5 May 2017 14:37:34 +0000 (UTC)
commit 4b84cb475a4c746795542efac80a10d44156a2c8
Author: Kai Lüke <kailueke riseup net>
Date: Tue Apr 11 12:45:57 2017 +0200
Fix unmounting and probing of mounted volumes
Everytime all volumes of a device were to be umounted
(e.g. in order to eject the device) the LUKS partitions
have not been closed due to a bug. Also the benchmark
dialog preselected the write option for every device but
was supposed to do this only for unused devices.
This is because of broken code in gdu_utils_is_in_use_full
which always returned FALSE or TRUE depending on whether a
pointer was passed in filesystem_to_unmount_out and also its
code to set encrypted_to_lock_out was never executed then
and gdu_utils_is_in_use always returned FALSE.
After repairing the code the iterative umounting of all
mounted volumes works again and the write option in the
benchmark is only preselected for unmounted devices.
https://bugzilla.gnome.org/show_bug.cgi?id=780865
src/libgdu/gduutils.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libgdu/gduutils.c b/src/libgdu/gduutils.c
index f1940ad..2a347ca 100644
--- a/src/libgdu/gduutils.c
+++ b/src/libgdu/gduutils.c
@@ -944,6 +944,7 @@ gdu_utils_is_in_use_full (UDisksClient *client,
if (g_strv_length ((gchar **) mount_points) > 0)
{
filesystem_to_unmount = g_object_ref (filesystem_for_object);
+ ret = TRUE;
goto victim_found;
}
}
@@ -957,6 +958,7 @@ gdu_utils_is_in_use_full (UDisksClient *client,
{
g_object_unref (cleartext);
encrypted_to_lock = g_object_ref (encrypted_for_object);
+ ret = TRUE;
goto victim_found;
}
}
@@ -968,13 +970,11 @@ gdu_utils_is_in_use_full (UDisksClient *client,
{
*filesystem_to_unmount_out = (filesystem_to_unmount != NULL) ?
g_object_ref (filesystem_to_unmount) : NULL;
- ret = TRUE;
}
- else if (encrypted_to_lock_out != NULL)
+ if (encrypted_to_lock_out != NULL)
{
*encrypted_to_lock_out = (encrypted_to_lock != NULL) ?
g_object_ref (encrypted_to_lock) : NULL;
- ret = TRUE;
}
g_clear_object (&partition_table);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]