diff --git a/pkg/storaged/block/format-dialog.jsx b/pkg/storaged/block/format-dialog.jsx index cd39b4533c40..02b4d96821db 100644 --- a/pkg/storaged/block/format-dialog.jsx +++ b/pkg/storaged/block/format-dialog.jsx @@ -171,7 +171,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended, title = cockpit.format(_("Format $0"), block_name(block)); function is_filesystem(vals) { - return vals.type != "empty" && vals.type != "dos-extended" && vals.type != "biosboot"; + return vals.type != "empty" && vals.type != "dos-extended" && vals.type != "biosboot" && vals.type != "swap"; } function add_fsys(storaged_name, entry) { @@ -187,6 +187,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended, add_fsys("vfat", { value: "vfat", title: "VFAT" }); add_fsys("ntfs", { value: "ntfs", title: "NTFS" }); if (client.in_anaconda_mode()) { + add_fsys("swap", { value: "swap", title: "Swap" }); if (block_ptable && block_ptable.Type == "gpt" && !client.anaconda.efi) add_fsys(true, { value: "biosboot", title: "BIOS boot partition" }); if (block_ptable && client.anaconda.efi) @@ -408,7 +409,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended, if (trigger == "at_boot") dlg.set_options("at_boot", { explanation: mount_explanation[vals.at_boot] }); else if (trigger == "type") { - if (dlg.get_value("type") == "empty") { + if (dlg.get_value("type") == "empty" || dlg.get_value("type") == "swap") { dlg.update_actions({ Variants: null, Title: _("Format") }); } else { dlg.update_actions({ Variants: [action_variant], Title: action_title });