Skip to content

Commit

Permalink
Move several *_SUPER_MAGIC symbols to include/linux/magic.h.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Garzik <[email protected]>
  • Loading branch information
Jeff Garzik committed Sep 24, 2006
1 parent 4f5537d commit e18fa70
Show file tree
Hide file tree
Showing 30 changed files with 67 additions and 85 deletions.
1 change: 0 additions & 1 deletion fs/affs/affs.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include <linux/affs_fs.h>
#include <linux/amigaffs.h>

/* AmigaOS allows file names with up to 30 characters length.
Expand Down
1 change: 1 addition & 0 deletions fs/affs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/statfs.h>
#include <linux/parser.h>
#include <linux/magic.h>
#include "affs.h"

extern struct timezone sys_tz;
Expand Down
2 changes: 0 additions & 2 deletions fs/autofs/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#define DPRINTK(D) ((void)0)
#endif

#define AUTOFS_SUPER_MAGIC 0x0187

/*
* If the daemon returns a negative response (AUTOFS_IOC_FAIL) then the
* kernel will keep the negative response cached for up to the time given
Expand Down
1 change: 1 addition & 0 deletions fs/autofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/file.h>
#include <linux/parser.h>
#include <linux/bitops.h>
#include <linux/magic.h>
#include "autofs_i.h"
#include <linux/module.h>

Expand Down
2 changes: 0 additions & 2 deletions fs/autofs4/autofs_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
#define DPRINTK(fmt,args...) do {} while(0)
#endif

#define AUTOFS_SUPER_MAGIC 0x0187

/* Unified info structure. This is pointed to by both the dentry and
inode structures. Each file in the filesystem has an instance of this
structure. It holds a reference to the dentry, so dentries are never
Expand Down
1 change: 1 addition & 0 deletions fs/autofs4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/parser.h>
#include <linux/bitops.h>
#include <linux/smp_lock.h>
#include <linux/magic.h>
#include "autofs_i.h"
#include <linux/module.h>

Expand Down
1 change: 0 additions & 1 deletion fs/hpfs/hpfs_fn.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <linux/mutex.h>
#include <linux/pagemap.h>
#include <linux/buffer_head.h>
#include <linux/hpfs_fs.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>

Expand Down
1 change: 1 addition & 0 deletions fs/hpfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/parser.h>
#include <linux/init.h>
#include <linux/statfs.h>
#include <linux/magic.h>

/* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */

Expand Down
2 changes: 1 addition & 1 deletion fs/openpromfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
#include <linux/types.h>
#include <linux/string.h>
#include <linux/fs.h>
#include <linux/openprom_fs.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/seq_file.h>
#include <linux/magic.h>

#include <asm/openprom.h>
#include <asm/oplib.h>
Expand Down
4 changes: 1 addition & 3 deletions include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ header-y += netfilter_bridge/
header-y += netfilter_ipv4/
header-y += netfilter_ipv6/

header-y += affs_fs.h
header-y += affs_hardblocks.h
header-y += aio_abi.h
header-y += a.out.h
Expand Down Expand Up @@ -67,7 +66,6 @@ header-y += genetlink.h
header-y += gen_stats.h
header-y += gigaset_dev.h
header-y += hdsmart.h
header-y += hpfs_fs.h
header-y += hysdn_if.h
header-y += i2c-dev.h
header-y += i8k.h
Expand Down Expand Up @@ -103,6 +101,7 @@ header-y += ixjuser.h
header-y += jffs2.h
header-y += keyctl.h
header-y += limits.h
header-y += magic.h
header-y += major.h
header-y += matroxfb.h
header-y += meye.h
Expand All @@ -116,7 +115,6 @@ header-y += netrom.h
header-y += nfs2.h
header-y += nfs4_mount.h
header-y += nfs_mount.h
header-y += openprom_fs.h
header-y += param.h
header-y += pci_ids.h
header-y += pci_regs.h
Expand Down
2 changes: 1 addition & 1 deletion include/linux/adfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _ADFS_FS_H

#include <linux/types.h>
#include <linux/magic.h>

/*
* Disc Record at disc address 0xc00
Expand Down Expand Up @@ -38,7 +39,6 @@ struct adfs_discrecord {
#define ADFS_DR_OFFSET (0x1c0)
#define ADFS_DR_SIZE 60
#define ADFS_DR_SIZE_BITS (ADFS_DR_SIZE << 3)
#define ADFS_SUPER_MAGIC 0xadf5

#ifdef __KERNEL__
#include <linux/adfs_fs_i.h>
Expand Down
7 changes: 0 additions & 7 deletions include/linux/affs_fs.h

This file was deleted.

4 changes: 2 additions & 2 deletions include/linux/coda_psdev.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#ifndef __CODA_PSDEV_H
#define __CODA_PSDEV_H

#include <linux/magic.h>

#define CODA_PSDEV_MAJOR 67
#define MAX_CODADEVS 5 /* how many do we allow */

#define CODA_SUPER_MAGIC 0x73757245

struct kstatfs;

struct coda_sb_info
Expand Down
3 changes: 1 addition & 2 deletions include/linux/efs_fs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#ifndef __EFS_FS_SB_H__
#define __EFS_FS_SB_H__

/* statfs() magic number for EFS */
#define EFS_SUPER_MAGIC 0x414A53
#include <linux/magic.h>

/* EFS superblock magic numbers */
#define EFS_MAGIC 0x072959
Expand Down
6 changes: 1 addition & 5 deletions include/linux/ext2_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define _LINUX_EXT2_FS_H

#include <linux/types.h>
#include <linux/magic.h>

/*
* The second extended filesystem constants/structures
Expand Down Expand Up @@ -63,11 +64,6 @@
/* First non-reserved inode for old ext2 filesystems */
#define EXT2_GOOD_OLD_FIRST_INO 11

/*
* The second extended file system magic number
*/
#define EXT2_SUPER_MAGIC 0xEF53

#ifdef __KERNEL__
#include <linux/ext2_fs_sb.h>
static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
Expand Down
6 changes: 1 addition & 5 deletions include/linux/ext3_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define _LINUX_EXT3_FS_H

#include <linux/types.h>
#include <linux/magic.h>

/*
* The second extended filesystem constants/structures
Expand Down Expand Up @@ -66,11 +67,6 @@
/* First non-reserved inode for old ext3 filesystems */
#define EXT3_GOOD_OLD_FIRST_INO 11

/*
* The second extended file system magic number
*/
#define EXT3_SUPER_MAGIC 0xEF53

/*
* Maximal count of links to a file
*/
Expand Down
8 changes: 0 additions & 8 deletions include/linux/hpfs_fs.h

This file was deleted.

6 changes: 3 additions & 3 deletions include/linux/iso_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define _ISOFS_FS_H

#include <linux/types.h>
#include <linux/magic.h>

/*
* The isofs filesystem constants/structures
*/
Expand Down Expand Up @@ -160,6 +162,4 @@ struct iso_directory_record {
#define ISOFS_BUFFER_SIZE(INODE) ((INODE)->i_sb->s_blocksize)
#define ISOFS_BUFFER_BITS(INODE) ((INODE)->i_sb->s_blocksize_bits)

#define ISOFS_SUPER_MAGIC 0x9660

#endif
#endif /* _ISOFS_FS_H */
4 changes: 2 additions & 2 deletions include/linux/jffs2.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#ifndef __LINUX_JFFS2_H__
#define __LINUX_JFFS2_H__

#include <linux/magic.h>

/* You must include something which defines the C99 uintXX_t types.
We don't do it from here because this file is used in too many
different environments. */

#define JFFS2_SUPER_MAGIC 0x72b6

/* Values we may expect to find in the 'magic' field */
#define JFFS2_OLD_MAGIC_BITMASK 0x1984
#define JFFS2_MAGIC_BITMASK 0x1985
Expand Down
37 changes: 37 additions & 0 deletions include/linux/magic.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#ifndef __LINUX_MAGIC_H__
#define __LINUX_MAGIC_H__

#define ADFS_SUPER_MAGIC 0xadf5
#define AFFS_SUPER_MAGIC 0xadff
#define AUTOFS_SUPER_MAGIC 0x0187
#define CODA_SUPER_MAGIC 0x73757245
#define EFS_SUPER_MAGIC 0x414A53
#define EXT2_SUPER_MAGIC 0xEF53
#define EXT3_SUPER_MAGIC 0xEF53
#define HPFS_SUPER_MAGIC 0xf995e849
#define ISOFS_SUPER_MAGIC 0x9660
#define JFFS2_SUPER_MAGIC 0x72b6

#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */

#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */
#define NFS_SUPER_MAGIC 0x6969
#define OPENPROM_SUPER_MAGIC 0x9fa1
#define PROC_SUPER_MAGIC 0x9fa0
#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */

#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */
/* used by file system utilities that
look at the superblock, etc. */
#define REISERFS_SUPER_MAGIC_STRING "ReIsErFs"
#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"

#define SMB_SUPER_MAGIC 0x517B
#define USBDEVICE_SUPER_MAGIC 0x9fa2

#endif /* __LINUX_MAGIC_H__ */
6 changes: 2 additions & 4 deletions include/linux/minix_fs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _LINUX_MINIX_FS_H
#define _LINUX_MINIX_FS_H

#include <linux/magic.h>

/*
* The minix filesystem constants/structures
*/
Expand All @@ -19,10 +21,6 @@

#define MINIX_I_MAP_SLOTS 8
#define MINIX_Z_MAP_SLOTS 64
#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
#define MINIX_VALID_FS 0x0001 /* Clean fs. */
#define MINIX_ERROR_FS 0x0002 /* fs has errors. */

Expand Down
4 changes: 2 additions & 2 deletions include/linux/msdos_fs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _LINUX_MSDOS_FS_H
#define _LINUX_MSDOS_FS_H

#include <linux/magic.h>

/*
* The MS-DOS filesystem constants/structures
*/
Expand All @@ -18,8 +20,6 @@
#define CT_LE_L(v) cpu_to_le32(v)


#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */

#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
#define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */

Expand Down
5 changes: 1 addition & 4 deletions include/linux/ncp_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/fs.h>
#include <linux/in.h>
#include <linux/types.h>
#include <linux/magic.h>

#include <linux/ipx.h>
#include <linux/ncp_no.h>
Expand Down Expand Up @@ -185,10 +186,6 @@ struct ncp_entry_info {
__u8 file_handle[6];
};

/* Guess, what 0x564c is :-) */
#define NCP_SUPER_MAGIC 0x564c


static inline struct ncp_server *NCP_SBP(struct super_block *sb)
{
return sb->s_fs_info;
Expand Down
7 changes: 2 additions & 5 deletions include/linux/nfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef _LINUX_NFS_FS_H
#define _LINUX_NFS_FS_H

#include <linux/magic.h>

/*
* Enable debugging support for nfs client.
* Requires RPC_DEBUG.
Expand All @@ -21,11 +23,6 @@
#define NFS_MAX_UDP_TIMEOUT (60*HZ)
#define NFS_MAX_TCP_TIMEOUT (600*HZ)

/*
* superblock magic number for NFS
*/
#define NFS_SUPER_MAGIC 0x6969

/*
* When flushing a cluster of dirty pages, there can be different
* strategies:
Expand Down
10 changes: 0 additions & 10 deletions include/linux/openprom_fs.h

This file was deleted.

3 changes: 1 addition & 2 deletions include/linux/proc_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/spinlock.h>
#include <linux/magic.h>
#include <asm/atomic.h>

/*
Expand All @@ -24,8 +25,6 @@ enum {
PROC_ROOT_INO = 1,
};

#define PROC_SUPER_MAGIC 0x9fa0

/*
* This is not completely implemented yet. The idea is to
* create an in-memory tree (like the actual /proc filesystem
Expand Down
2 changes: 1 addition & 1 deletion include/linux/qnx4_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#define _LINUX_QNX4_FS_H

#include <linux/qnxtypes.h>
#include <linux/magic.h>

#define QNX4_ROOT_INO 1

Expand All @@ -25,7 +26,6 @@

#define QNX4_I_MAP_SLOTS 8
#define QNX4_Z_MAP_SLOTS 64
#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
#define QNX4_VALID_FS 0x0001 /* Clean fs. */
#define QNX4_ERROR_FS 0x0002 /* fs has errors. */
#define QNX4_BLOCK_SIZE 0x200 /* blocksize of 512 bytes */
Expand Down
Loading

0 comments on commit e18fa70

Please sign in to comment.