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

Incorrect input partition error #1

Open
SuchitReddi opened this issue Nov 24, 2023 · 0 comments
Open

Incorrect input partition error #1

SuchitReddi opened this issue Nov 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@SuchitReddi
Copy link
Owner

Let's say the target partition for an operation for example Cryptographic Erasure is /dev/sda1.
But because of some previous operation, this partition is already unmounted.

Let's say the user doesn't know how to give the partition and inputs sda1 when asked.

Expected behavior:
The user should be warned of this incorrect input, and result should be shown as unmounting failure.

Actual behavior:
It shows sda1 successfully unmounted.

Cause:
In the chk_unmount() function, the logic used for checking if a device is mounted:
if grep -qs "$partition" /proc/mounts; then
So, when sda1 is not present, it returns success.

@SuchitReddi SuchitReddi self-assigned this Nov 24, 2023
SuchitReddi pushed a commit that referenced this issue Dec 17, 2023
feat: add top-level commands in main.py
@SuchitReddi SuchitReddi added bug Something isn't working KWoC2023 Contributions from Kharagpur Winter of Code 2023 (mentor) labels Jan 3, 2024
@SuchitReddi SuchitReddi removed the KWoC2023 Contributions from Kharagpur Winter of Code 2023 (mentor) label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant