summaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4_common.c
diff options
context:
space:
mode:
authorYegor Yefremov <yegorslists@googlemail.com>2016-01-26 11:38:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-02-03 07:57:36 +0100
commitc8b37d49830a38243d570b90d03da6be8c0b664c (patch)
tree1d774ae0ce776b965898d857c33456943860982d /fs/ext4/ext4_common.c
parent0123e9f63304304b4b1cf86871cc33832d9569f6 (diff)
downloadbarebox-c8b37d49830a38243d570b90d03da6be8c0b664c.tar.gz
barebox-c8b37d49830a38243d570b90d03da6be8c0b664c.tar.xz
fs: import magic.h from Linux kernel
include/linux/magic.h provides MAGIC numbers for various file systems. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/ext4/ext4_common.c')
-rw-r--r--fs/ext4/ext4_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 04b1915d5f..590f54d5d8 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -32,6 +32,7 @@
#include <malloc.h>
#include <linux/stat.h>
#include <linux/time.h>
+#include <linux/magic.h>
#include <asm/byteorder.h>
#include <dma.h>
@@ -499,7 +500,7 @@ int ext4fs_mount(struct ext_filesystem *fs)
goto fail;
/* Make sure this is an ext2 filesystem. */
- if (__le16_to_cpu(data->sblock.magic) != EXT2_MAGIC) {
+ if (__le16_to_cpu(data->sblock.magic) != EXT2_SUPER_MAGIC) {
ret = -EINVAL;
goto fail;
}