[gparted] Add GParted internal detection of nilfs2 (#742741)



commit 53fb18096d175241dec8260e2dbaf7d72c75a043
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Jan 10 14:26:09 2015 +0000

    Add GParted internal detection of nilfs2 (#742741)
    
    GParted can create a nilfs2 file system on RHEL/CentOS 6, yet both
    libparted and blkid are too old to recognise it when created.  Add
    GParted internal detection of nilfs2 file systems.
    
    Easy way to get the required signature needed to recognise nilfs2 is
    using wipefs to report the signature bytes it erases, using a more up to
    date distribution.  So using CentOS 7:
    
        # mkfs.nilfs2 /dev/sdb1
        # wipefs -a /dev/sdb1
        /dev/sdb1: 2 bytes were erased at offset 0x00000406 (nilfs2): 34 34
    
    Also from util-linux source libblkid/src/superblocks/nilfs2.c
        #define NILFS_SB_MAGIC 0x3434
    
    Bug 742741 - Nilfs2 file system is unusable on RHEL/CentOS 6

 src/GParted_Core.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index e713af6..eba8526 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1333,7 +1333,8 @@ FILESYSTEM GParted_Core::recognise_filesystem_signature( PedDevice * lp_device,
                {   512LL, "LABELONE"    ,   536LL, "LVM2", FS_LVM2_PV   },
                {     0LL, "LUKS\xBA\xBE",     0LL, NULL  , FS_LUKS      },
                { 65600LL, "_BHRfS_M"    ,     0LL, NULL  , FS_BTRFS     },
-               {     3LL, "-FVE-FS-"    ,     0LL, NULL  , FS_BITLOCKER }
+               {     3LL, "-FVE-FS-"    ,     0LL, NULL  , FS_BITLOCKER },
+               {  1030LL, "\x34\x34"    ,     0LL, NULL  , FS_NILFS2    }
        };
        // Reference:
        //   Detecting BitLocker


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]