From 4ff1888333084dd20da7645f9a003671d9d0e06d Mon Sep 17 00:00:00 2001
From: localhorst <localhorst@mosad.xyz>
Date: Mon, 19 Aug 2024 15:35:22 +0200
Subject: [PATCH] ignore system drives as live image

---
 include/reHDD.h | 2 +-
 src/reHDD.cpp   | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/reHDD.h b/include/reHDD.h
index 9ffa69f..9f02846 100644
--- a/include/reHDD.h
+++ b/include/reHDD.h
@@ -8,7 +8,7 @@
 #ifndef REHDD_H_
 #define REHDD_H_
 
-#define REHDD_VERSION "V1.1.2"
+#define REHDD_VERSION "V1.1.3"
 
 // Drive handling Settings
 #define WORSE_HOURS 19200    // mark drive if at this limit or beyond
diff --git a/src/reHDD.cpp b/src/reHDD.cpp
index 9338242..a98b2c8 100644
--- a/src/reHDD.cpp
+++ b/src/reHDD.cpp
@@ -665,6 +665,12 @@ bool reHDD::getSystemDrive(string &systemDrive)
             break;
         }
 
+        if (currentLine.ends_with(" /run/overlay/live\n"s))
+        {
+            systemDriveFound = true;
+            break;
+        }
+
         if (currentLine.ends_with(" /\n"s))
         {
             systemDriveFound = true;