Commit 918e5f9f authored by Kenny Root's avatar Kenny Root
Browse files

Better error code for unmounting not-mounted volumes

ENOENT is more descriptive than the generic error that EINVAL gets
turned into. Then we can actually treat it how we want on the other
side.

Change-Id: I9b4f3be6308e13f680eae368d2167ab9ee6aae5f
parent cbacf78e
......@@ -559,7 +559,7 @@ int VolumeManager::unmountLoopImage(const char *id, const char *idHash,
const char *fileName, const char *mountPoint, bool force) {
if (!isMountpointMounted(mountPoint)) {
SLOGE("Unmount request for %s when not mounted", id);
errno = EINVAL;
errno = ENOENT;
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment