From: Lennart Poettering Date: Mon, 15 Nov 2021 21:53:25 +0000 (+0100) Subject: filesystems: add ntfs/ntfs3 magic and add it current version to group X-Git-Tag: v250-rc1~247^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05715f12a8be1123c9c8ee2096b9a1c0a38907b3;p=thirdparty%2Fsystemd.git filesystems: add ntfs/ntfs3 magic and add it current version to group As suggested: https://github.com/systemd/systemd/pull/21373#discussion_r749523677 --- diff --git a/src/basic/filesystems-gperf.gperf b/src/basic/filesystems-gperf.gperf index 0c0c609f80b..7dd660addf1 100644 --- a/src/basic/filesystems-gperf.gperf +++ b/src/basic/filesystems-gperf.gperf @@ -85,6 +85,8 @@ nfs, {NFS_SUPER_MAGIC} nfs4, {NFS_SUPER_MAGIC} nilfs2, {NILFS_SUPER_MAGIC} nsfs, {NSFS_MAGIC} +ntfs, {NTFS_SB_MAGIC} +ntfs3, {NTFS3_SUPER_MAGIC} ocfs2, {OCFS2_SUPER_MAGIC} openpromfs, {OPENPROM_SUPER_MAGIC} orangefs, {ORANGEFS_DEVREQ_MAGIC} diff --git a/src/basic/filesystems.c b/src/basic/filesystems.c index c3fe6497be3..b9cc6221072 100644 --- a/src/basic/filesystems.c +++ b/src/basic/filesystems.c @@ -99,6 +99,7 @@ const FilesystemSet filesystem_sets[_FILESYSTEM_SET_MAX] = { "exfat\0" "ext4\0" "iso9660\0" + "ntfs3\0" "squashfs\0" "udf\0" "vfat\0" diff --git a/src/basic/missing_magic.h b/src/basic/missing_magic.h index 7b586971ae1..7d9320bb6dc 100644 --- a/src/basic/missing_magic.h +++ b/src/basic/missing_magic.h @@ -177,3 +177,13 @@ #ifndef RPC_PIPEFS_SUPER_MAGIC #define RPC_PIPEFS_SUPER_MAGIC 0x67596969 #endif + +/* Not exposed yet, defined at fs/ntfs/ntfs.h */ +#ifndef NTFS_SB_MAGIC +#define NTFS_SB_MAGIC 0x5346544e +#endif + +/* Not exposed yet, encoded literally in fs/ntfs3/super.c. */ +#ifndef NTFS3_SUPER_MAGIC +#define NTFS3_SUPER_MAGIC 0x7366746e +#endif