From 918e5f9f10b9c1ff929683743ffbf229027ce240 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Thu, 30 Sep 2010 18:00:52 -0700 Subject: [PATCH] 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 --- VolumeManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VolumeManager.cpp b/VolumeManager.cpp index 899dc23..3b229b7 100644 --- a/VolumeManager.cpp +++ b/VolumeManager.cpp @@ -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; } -- 2.11.0