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
This commit is contained in:
Mike Fleetwood 2015-01-10 14:26:09 +00:00 committed by Curtis Gedak
parent f5c044142c
commit 53fb18096d
1 changed files with 2 additions and 1 deletions

View File

@ -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