installer: Ignore umount errors when target doesn't exist

Message ID 20211222160726.2895568-1-michael.tremer@ipfire.org
State Accepted
Commit 91588cb42a2322a8aebd176ec59d1b18e8bbbd9b
Headers show
Series installer: Ignore umount errors when target doesn't exist | expand

Commit Message

Michael Tremer Dec. 22, 2021, 4:07 p.m. UTC
Some paths might not exist on some systems which caused the installer to
abort the installation. This patch makes the installer ignore this
condition.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 src/installer/hw.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/src/installer/hw.c b/src/installer/hw.c
index 265df2d8c..b532bb16e 100644
--- a/src/installer/hw.c
+++ b/src/installer/hw.c
@@ -188,6 +188,11 @@  int hw_umount(const char* source, const char* prefix) {
 			case EINVAL:
 				r = 0;
 				break;
+
+			// target doesn't exist
+			case ENOENT:
+				r = 0;
+				break;
 		}
 	}