Skip to content

Commit

Permalink
storaged: register a crossref for all filesystems
Browse files Browse the repository at this point in the history
To be able to link to a BTRFS device in the BTRFS volume page we want to
register all backing blocks to create link to btrfs volume devices.
  • Loading branch information
jelly committed Oct 20, 2023
1 parent ff69b87 commit 131ce27
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/storaged/pages/filesystem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { StorageButton, StorageLink, StorageUsageBar } from "../storage-controls
import {
ParentPageLink, PageContainerStackItems,
new_page, block_location, ActionButtons, page_type,
register_crossref,
} from "../pages.jsx";
import { format_dialog } from "../format-dialog.jsx";
import { is_mounted, mounting_dialog, get_cryptobacking_noauto } from "../fsys-tab.jsx"; // XXX
Expand Down Expand Up @@ -135,7 +136,7 @@ export function make_filesystem_page(parent, backing_block, content_block, fstab
else
mp_text = _("(not mounted)");

new_page({
const filesystem_page = new_page({
location: [block_location(backing_block)],
parent,
container,
Expand All @@ -155,6 +156,13 @@ export function make_filesystem_page(parent, backing_block, content_block, fstab
{ title: _("Format"), action: () => format_dialog(client, backing_block.path), danger: true },
]
});

register_crossref({
key: backing_block,
page: filesystem_page,
size: fmt_size(backing_block.data.Size),
actions: [],
});
}

export const MountPoint = ({ fstab_config, forced_options, backing_block, content_block }) => {
Expand Down

0 comments on commit 131ce27

Please sign in to comment.