meta/classes/sdk: use rootfs_do_umounts to unmount the filesystem

Message ID 20250117142513.264551-1-srinuvasan.a@siemens.com
State New
Headers show
Series meta/classes/sdk: use rootfs_do_umounts to unmount the filesystem | expand

Commit Message

srinuvasan.a Jan. 17, 2025, 2:25 p.m. UTC
From: srinuvasan <srinuvasan.a@siemens.com>

Use the rootfs_do_umounts function instead of duplicating the unmount
filesystem.

Signed-off-by: srinuvasan <srinuvasan.a@siemens.com>
---
 meta/classes/sdk.bbclass | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Patch

diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
index c69f7096..46436d97 100644
--- a/meta/classes/sdk.bbclass
+++ b/meta/classes/sdk.bbclass
@@ -90,16 +90,8 @@  sdkchroot_configscript () {
 
 ROOTFS_POSTPROCESS_COMMAND:append:class-sdk = " sdkchroot_finalize"
 sdkchroot_finalize() {
-    mountpoint -q "${ROOTFSDIR}/dev/pts" && \
-        sudo umount "${ROOTFSDIR}/dev/pts"
-    mountpoint -q "${ROOTFSDIR}/dev/shm" && \
-        sudo umount "${ROOTFSDIR}/dev/shm"
-    mountpoint -q "${ROOTFSDIR}/dev" && \
-        sudo umount "${ROOTFSDIR}/dev"
-    mountpoint -q "${ROOTFSDIR}/proc" && \
-        sudo umount "${ROOTFSDIR}/proc"
-    mountpoint -q "${ROOTFSDIR}/sys" && \
-        sudo umount "${ROOTFSDIR}/sys"
+
+    rootfs_do_umounts
 
     # Remove setup scripts
     sudo rm -f ${ROOTFSDIR}/chroot-setup.sh ${ROOTFSDIR}/configscript.sh