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

Misleading error message when permissions to device are lacking #28

Open
camio opened this issue Jan 14, 2023 · 0 comments · May be fixed by #29
Open

Misleading error message when permissions to device are lacking #28

camio opened this issue Jan 14, 2023 · 0 comments · May be fixed by #29

Comments

@camio
Copy link

camio commented Jan 14, 2023

When executing fatresize as a user that lacks permissions to the specified device, it fails with the following message:

You must specify exactly one existing device.

Since the user specified a device, this message is misleading. I ran into this issue and I suspect the two users participating in this reddit thread did as well.

The root cause seems to be the ped_device_get call in the probe_device function which errors out due to lack of permissions, but the error message is swallowed instead of reported back to the user.

I'll create a PR shortly that doesn't address the root cause, but at least provides an error message that hints to the user that their lack of permissions may be the problem.

camio added a commit to camio/fatresize that referenced this issue Jan 14, 2023
The missing device condition can also be caused by a lack of permissions
to the specified device as described in ya-mouse#28. This revised error message
hints that this may be the cause of the failure.

Fixes ya-mouse#28.
@camio camio linked a pull request Jan 14, 2023 that will close this issue
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 a pull request may close this issue.

1 participant