diff options
author | Tinguely, Mark <mark.tinguely@hpe.com> | 2018-05-09 16:50:25 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-05-09 16:50:25 +0200 |
commit | a92dcf5a6cc49660d75a67966b0eb093b88e3b4c (patch) | |
tree | d14700cd141a2d0103c5639a2518636051f259d6 /bylabel.c | |
parent | 59b280ebe22eceaf4250cb3b776674619a4d4ece (diff) | |
download | linuxquota-a92dcf5a6cc49660d75a67966b0eb093b88e3b4c.tar.gz |
Aadd HPE XFS support
HPE XFS has a different superblock magic and type name
to allow the community XFS and HPE XFS to coexist in
the same linux kernel.
This patch add HPE XFS support to the quota-tools so
our customers can use it.
Signed-off-by: Mark Tinguely <mark.tinguely@hpe.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'bylabel.c')
-rw-r--r-- | bylabel.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -48,6 +48,7 @@ struct ext2_super_block { #define XFS_SUPER_MAGIC "XFSB" #define XFS_SUPER_MAGIC2 "BSFX" +#define EXFS_SUPER_MAGIC "EXFS" struct xfs_super_block { u_char s_magic[4]; u_char s_dummy[28]; @@ -107,7 +108,8 @@ static int get_label_uuid(const char *device, char **label, char *uuid) else if (lseek(fd, 0, SEEK_SET) == 0 && read(fd, (char *)&xfsb, sizeof(xfsb)) == sizeof(xfsb) && (strncmp((char *)&xfsb.s_magic, XFS_SUPER_MAGIC, 4) == 0 || - strncmp((char *)&xfsb.s_magic, XFS_SUPER_MAGIC2, 4) == 0)) { + strncmp((char *)&xfsb.s_magic, XFS_SUPER_MAGIC2, 4) == 0 || + strncmp((char *)&xfsb.s_magic, EXFS_SUPER_MAGIC, 4) == 0)) { memcpy(uuid, xfsb.s_uuid, sizeof(xfsb.s_uuid)); namesize = sizeof(xfsb.s_fsname); *label = smalloc(namesize + 1); |