[gnome-disk-utility/kailueke/hide-zram-device] Do not display zram devices
- From: Kai Lüke <kailueke src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/kailueke/hide-zram-device] Do not display zram devices
- Date: Mon, 12 Oct 2020 13:58:04 +0000 (UTC)
commit 5c2fa5985bf216b9e14cd899e79c2b4265037629
Author: Kai Lüke <kailueke riseup net>
Date: Mon Oct 12 22:52:45 2020 +0900
Do not display zram devices
Showing zram devices is not useful because currently the exposed
actions are not those of swap devices. It can even be harmful to show
them because an unaware user might try to write to alter them.
Hide them as is also done for /dev/ramX devices already.
src/disks/gdudevicetreemodel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/disks/gdudevicetreemodel.c b/src/disks/gdudevicetreemodel.c
index 329717a1..21572764 100644
--- a/src/disks/gdudevicetreemodel.c
+++ b/src/disks/gdudevicetreemodel.c
@@ -1201,7 +1201,7 @@ should_include_block (UDisksObject *object)
/* RAM devices are useless */
device = udisks_block_get_device (block);
- if (g_str_has_prefix (device, "/dev/ram"))
+ if (g_str_has_prefix (device, "/dev/ram") || g_str_has_prefix (device, "/dev/zram"))
goto out;
/* Don't show loop devices of size zero - they're unused.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]