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.
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
sda1when 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; thenSo, when sda1 is not present, it returns success.