Skip to content

Commit a7e3108

Browse files
brainfluxtorvalds
authored andcommitted
ramfs: move RAMFS_MAGIC to include/linux/magic.h
initramfs userspace likes to use this magic number. Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0d4c36a commit a7e3108

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎fs/ramfs/inode.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@
3434
#include <linux/ramfs.h>
3535
#include <linux/sched.h>
3636
#include <linux/parser.h>
37+
#include <linux/magic.h>
3738
#include <asm/uaccess.h>
3839
#include "internal.h"
3940

40-
/* some random number */
41-
#define RAMFS_MAGIC 0x858458f6
42-
4341
#define RAMFS_DEFAULT_MODE 0755
4442

4543
static const struct super_operations ramfs_ops;

‎include/linux/magic.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define SYSFS_MAGIC 0x62656572
1313
#define SECURITYFS_MAGIC 0x73636673
1414
#define SELINUX_MAGIC 0xf97cff8c
15+
#define RAMFS_MAGIC 0x858458f6 /* some random number */
1516
#define TMPFS_MAGIC 0x01021994
1617
#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */
1718
#define SQUASHFS_MAGIC 0x73717368

0 commit comments

Comments
 (0)