Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storaged: refactor mount point text code into a common function #19824

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

jelly
Copy link
Member

@jelly jelly commented Jan 8, 2024

In the btrfs PR this logic was copied over again and then refactored in a function. As this was conflictly I pulled it apart as it already is useful for Cockpit itself.

In the btrfs PR this logic was copied over again and then refactored in
a function.
@jelly jelly requested a review from mvollmer January 8, 2024 10:45
@mvollmer
Copy link
Member

mvollmer commented Jan 8, 2024

Thanks! This also helps #19807.

mp_text = _("(not mounted)");
const mp_text = mount_point_text(mount_point, mounted);
if (mp_text == null)
return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test. Details

if (mount_point) {
mp_text = client.strip_mount_point_prefix(mount_point);
if (mp_text == false)
return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test. Details

mp_text = _("(not mounted)");
const mp_text = mount_point_text(mount_point, fs_is_mounted);
if (mp_text == null)
return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test. Details

@jelly jelly merged commit 92ab4f8 into cockpit-project:main Jan 8, 2024
90 of 93 checks passed
@jelly jelly deleted the re-use-mount-point-text branch January 8, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants