After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785453 - gnome-disk couldn't edit mount option for swap partition
gnome-disk couldn't edit mount option for swap partition
Status: RESOLVED FIXED
Product: gnome-disk-utility
Classification: Core
Component: general
3.25.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-disk-utility-maint
gnome-disk-utility-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-26 17:22 UTC by Mikhail
Modified: 2017-09-18 11:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (162.59 KB, image/png)
2017-07-26 17:22 UTC, Mikhail
  Details
Show mount options for swap volumes (3.88 KB, patch)
2017-08-01 15:29 UTC, Kai Lüke
none Details | Review
Show mount options for swap volumes (4.17 KB, patch)
2017-08-14 22:35 UTC, Kai Lüke
none Details | Review
Show mount options for swap volumes (4.25 KB, patch)
2017-08-15 20:35 UTC, Kai Lüke
committed Details | Review

Description Mikhail 2017-07-26 17:22:49 UTC
Created attachment 356435 [details]
screenshot

gnome-disk couldn't edit mount option for swap partition.
Comment 1 Mikhail 2017-07-26 17:26:51 UTC
Without editing mount option is impossible make swap partition permanent by GUI.
Comment 2 Kai Lüke 2017-08-01 15:29:51 UTC
Created attachment 356744 [details] [review]
Show mount options for swap volumes

Thanks for reporting this, here is a patch pending to be reviewed.
Comment 3 Ondrej Holy 2017-08-02 08:17:54 UTC
Review of attachment 356744 [details] [review]:

Hmm, ok, but we have to do something also with the prefilled mount options. I would say that "Show in user interface", "Display Name", "Icon Name" etc. don't make sense at all for swap...

::: src/disks/gdufstabdialog.c
@@ +411,3 @@
   data.symbolic_icon_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-symbolic-icon-entry"));
 
+  data.is_swap = udisks_object_peek_swapspace (object) != NULL;

data.is_swap = (udisks_object_peek_swapspace (object) != NULL);
Comment 4 Kai Lüke 2017-08-14 22:35:03 UTC
Created attachment 357575 [details] [review]
Show mount options for swap volumes

The other irrelevant entries are now insensitive as well.
Comment 5 Ondrej Holy 2017-08-15 11:25:20 UTC
Review of attachment 357575 [details] [review]:

Thanks for update.

Does swap work correctly with "auto" filesystem type?

::: src/disks/gdufstabdialog.c
@@ +460,3 @@
+      dir = "none";
+      gtk_widget_set_sensitive (data.directory_entry, FALSE);
+      gtk_widget_set_sensitive (data.show_checkbutton, FALSE);

Yes, but you have to change also the default options, which currently contains the following:
opts = "nosuid,nodev,nofail,x-gvfs-show";

Also not sure about the other options...
Comment 6 Kai Lüke 2017-08-15 20:35:51 UTC
Created attachment 357673 [details] [review]
Show mount options for swap volumes

Good that you've spotted this, I think these defaults are better now.
Comment 7 Ondrej Holy 2017-08-16 13:48:33 UTC
Review of attachment 357673 [details] [review]:

Looks ok.