Blame 0096-add-support-to-F2FS-filesystem-fsck.patch

Harald Hoyer 414eba
From 9f521f76a007437083559dc2997570c88386d56c Mon Sep 17 00:00:00 2001
Harald Hoyer 414eba
From: tpg <tpgxyz@gmail.com>
Harald Hoyer 414eba
Date: Thu, 30 Jun 2016 21:26:42 +0200
Harald Hoyer 414eba
Subject: [PATCH] add support to F2FS filesystem (fsck)
Harald Hoyer 414eba
Harald Hoyer 414eba
---
Harald Hoyer 414eba
 NEWS                               | 3 +++
Harald Hoyer 414eba
 modules.d/03rescue/module-setup.sh | 2 +-
Harald Hoyer 414eba
 modules.d/95debug/module-setup.sh  | 2 +-
Harald Hoyer 414eba
 modules.d/99fs-lib/fs-lib.sh       | 5 +++++
Harald Hoyer 414eba
 modules.d/99fs-lib/module-setup.sh | 5 ++++-
Harald Hoyer 414eba
 5 files changed, 14 insertions(+), 3 deletions(-)
Harald Hoyer 414eba
Harald Hoyer 414eba
diff --git a/NEWS b/NEWS
Harald Hoyer 414eba
index 6d1cd0a..1ec8881 100644
Harald Hoyer 414eba
--- a/NEWS
Harald Hoyer 414eba
+++ b/NEWS
Harald Hoyer 414eba
@@ -56,6 +56,9 @@ systemd:
Harald Hoyer 414eba
 - add /etc/machine-info
Harald Hoyer 414eba
 - fixed systemd-escape call for names beginning with "-"
Harald Hoyer 414eba
 
Harald Hoyer 414eba
+filesystems:
Harald Hoyer 414eba
+- add support to F2FS filesystem (fsck)
Harald Hoyer 414eba
+
Harald Hoyer 414eba
 network:
Harald Hoyer 414eba
 - fix carrier detection
Harald Hoyer 414eba
 - correctly set mac address for ip=...:<mtu>:<mac>
Harald Hoyer 414eba
diff --git a/modules.d/03rescue/module-setup.sh b/modules.d/03rescue/module-setup.sh
Harald Hoyer 414eba
index f9dfcda..9267914 100755
Harald Hoyer 414eba
--- a/modules.d/03rescue/module-setup.sh
Harald Hoyer 414eba
+++ b/modules.d/03rescue/module-setup.sh
Harald Hoyer 414eba
@@ -15,6 +15,6 @@ depends() {
Harald Hoyer 414eba
 install() {
Harald Hoyer 414eba
     inst_multiple -o ps grep more cat rm strace free showmount \
Harald Hoyer 414eba
         ping netstat rpcinfo vi scp ping6 ssh \
Harald Hoyer 414eba
-        fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
Harald Hoyer 414eba
+        fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
 
Harald Hoyer 414eba
diff --git a/modules.d/95debug/module-setup.sh b/modules.d/95debug/module-setup.sh
Harald Hoyer 414eba
index 97b2a30..39debd8 100755
Harald Hoyer 414eba
--- a/modules.d/95debug/module-setup.sh
Harald Hoyer 414eba
+++ b/modules.d/95debug/module-setup.sh
Harald Hoyer 414eba
@@ -16,7 +16,7 @@ install() {
Harald Hoyer 414eba
     inst_multiple -o cat ls ps grep more cat rm strace free showmount \
Harald Hoyer 414eba
                   ping netstat rpcinfo vi scp ping6 ssh find vi \
Harald Hoyer 414eba
                   tcpdump cp less hostname mkdir \
Harald Hoyer 414eba
-                  fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.vfat e2fsck
Harald Hoyer 414eba
+                  fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
Harald Hoyer 414eba
 
Harald Hoyer 414eba
     grep '^tcpdump:' /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
Harald Hoyer 414eba
 }
Harald Hoyer 414eba
diff --git a/modules.d/99fs-lib/fs-lib.sh b/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer 414eba
index 672d027..5c83155 100755
Harald Hoyer 414eba
--- a/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer 414eba
+++ b/modules.d/99fs-lib/fs-lib.sh
Harald Hoyer 414eba
@@ -47,6 +47,11 @@ fsck_able() {
Harald Hoyer 414eba
             _drv="_drv=e2fsck fsck_drv_com" &&
Harald Hoyer 414eba
             return 0
Harald Hoyer 414eba
             ;;
Harald Hoyer 414eba
+        f2fs)
Harald Hoyer 414eba
+	    type fsck.f2fs >/dev/null 2>&1 &&
Harald Hoyer 414eba
+	    _drv="_drv=fsck.f2fs fsck_drv_com" &&
Harald Hoyer 414eba
+	    return 0
Harald Hoyer 414eba
+	    ;;
Harald Hoyer 414eba
         jfs)
Harald Hoyer 414eba
             type jfs_fsck >/dev/null 2>&1 &&
Harald Hoyer 414eba
             _drv="_drv=jfs_fsck fsck_drv_com" &&
Harald Hoyer 414eba
diff --git a/modules.d/99fs-lib/module-setup.sh b/modules.d/99fs-lib/module-setup.sh
Harald Hoyer 414eba
index f4dbc94..a29a350 100755
Harald Hoyer 414eba
--- a/modules.d/99fs-lib/module-setup.sh
Harald Hoyer 414eba
+++ b/modules.d/99fs-lib/module-setup.sh
Harald Hoyer 414eba
@@ -20,6 +20,9 @@ echo_fs_helper() {
Harald Hoyer 414eba
         ext?)
Harald Hoyer 414eba
             echo -n " e2fsck "
Harald Hoyer 414eba
             ;;
Harald Hoyer 414eba
+	f2fs)
Harald Hoyer 414eba
+	    echo -n " fsck.f2fs "
Harald Hoyer 414eba
+	    ;;
Harald Hoyer 414eba
         jfs)
Harald Hoyer 414eba
             echo -n " jfs_fsck "
Harald Hoyer 414eba
             ;;
Harald Hoyer 414eba
@@ -68,7 +71,7 @@ install() {
Harald Hoyer 414eba
         _helpers="\
Harald Hoyer 414eba
             umount mount /sbin/fsck*
Harald Hoyer 414eba
             xfs_db xfs_check xfs_repair xfs_metadump
Harald Hoyer 414eba
-            e2fsck jfs_fsck reiserfsck btrfsck
Harald Hoyer 414eba
+            e2fsck fsck.f2fs jfs_fsck reiserfsck btrfsck
Harald Hoyer 414eba
         "
Harald Hoyer 414eba
         if [[ $hostonly ]]; then
Harald Hoyer 414eba
             _helpers="umount mount "