Skip to content

mountpoint: add -q/--quiet - #725

Open
Harp404 wants to merge 1 commit into
uutils:mainfrom
Harp404:mountpoint-quiet
Open

Harp404 wants to merge 1 commit into
uutils:mainfrom
Harp404:mountpoint-quiet

Conversation

@Harp404

@Harp404 Harp404 commented Dec 1, 2026

Copy link
Copy Markdown

mountpoint -q is the usual way to test for a mount point in scripts (if mountpoint -q /mnt; then ...), but it was rejected:

$ mountpoint -q /
error: unexpected argument '-q' found

This adds -q/--quiet. Nothing is printed, and the exit status is the same as without it: 0 for a mount point, 32 for a path that is not one, and 1 for a path that can't be checked (that error message is dropped too). I checked those cases against util-linux 2.41.3 mountpoint -q.

The 3 new tests in tests/by-util/test_mountpoint.rs fail on main and pass with this change. cargo fmt and cargo clippy --all-targets -- -D warnings are clean.

I used Claude Code (Opus 5.5) to help investigate and draft this change; I reproduced the bug and checked the fix myself.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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.

2 participants