Currently error messages that operation cannot be performed are printed inside a function that checks if core devices are mounted. Those messages should be printed by the caller of the aforementioned function.
When checking mounts for cache or core with multiple mounted partitions the error message should contain all the relevant mounted devices. Now it shows only the first device that blocks cache stop or core remove.
Reason
Better code structure and more informative error message.
Description
Currently error messages that operation cannot be performed are printed inside a function that checks if core devices are mounted. Those messages should be printed by the caller of the aforementioned function. When checking mounts for cache or core with multiple mounted partitions the error message should contain all the relevant mounted devices. Now it shows only the first device that blocks cache stop or core remove.
Reason
Better code structure and more informative error message.