summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-09-22 16:51:07 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-22 16:51:07 +0000
commit9f423c554a0ffcee2e34472bf0bc1aef3621a822 (patch)
treeda786eabb8956dfbf19fdff62fa2da69ece6e1eb
parent413de5b0d4ddcf039aaef8b40a5f02d41dbb06e6 (diff)
parentc296e4f1512f260bab684b4ee8f3e4203717eca3 (diff)
downloadbionic-9f423c554a0ffcee2e34472bf0bc1aef3621a822.zip
bionic-9f423c554a0ffcee2e34472bf0bc1aef3621a822.tar.gz
bionic-9f423c554a0ffcee2e34472bf0bc1aef3621a822.tar.bz2
Merge "Use the uapi fs magic in <sys/vfs.h>."
-rw-r--r--libc/include/sys/vfs.h66
1 files changed, 22 insertions, 44 deletions
diff --git a/libc/include/sys/vfs.h b/libc/include/sys/vfs.h
index 5358ffb..1fbc8be 100644
--- a/libc/include/sys/vfs.h
+++ b/libc/include/sys/vfs.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_VFS_H_
#define _SYS_VFS_H_
@@ -114,50 +115,27 @@ struct statfs64 { __STATFS64_BODY };
#define _STATFS_F_FRSIZE
#define _STATFS_F_FLAGS
-#define ADFS_SUPER_MAGIC 0xadf5
-#define AFFS_SUPER_MAGIC 0xADFF
-#define BEFS_SUPER_MAGIC 0x42465331
-#define BFS_MAGIC 0x1BADFACE
-#define CIFS_MAGIC_NUMBER 0xFF534D42
-#define CODA_SUPER_MAGIC 0x73757245
-#define COH_SUPER_MAGIC 0x012FF7B7
-#define CRAMFS_MAGIC 0x28cd3d45
-#define DEVFS_SUPER_MAGIC 0x1373
-#define EFS_SUPER_MAGIC 0x00414A53
-#define EXT_SUPER_MAGIC 0x137D
-#define EXT2_OLD_SUPER_MAGIC 0xEF51
-#define EXT2_SUPER_MAGIC 0xEF53
-#define EXT3_SUPER_MAGIC 0xEF53
-#define HFS_SUPER_MAGIC 0x4244
-#define HPFS_SUPER_MAGIC 0xF995E849
-#define HUGETLBFS_MAGIC 0x958458f6
-#define ISOFS_SUPER_MAGIC 0x9660
-#define JFFS2_SUPER_MAGIC 0x72b6
-#define JFS_SUPER_MAGIC 0x3153464a
-#define MINIX_SUPER_MAGIC 0x137F /* orig. minix */
-#define MINIX_SUPER_MAGIC2 0x138F /* 30 char minix */
-#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 */
-#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2, 30 char names */
-#define MSDOS_SUPER_MAGIC 0x4d44
-#define NCP_SUPER_MAGIC 0x564c
-#define NFS_SUPER_MAGIC 0x6969
-#define NTFS_SB_MAGIC 0x5346544e
-#define OPENPROM_SUPER_MAGIC 0x9fa1
-#define PROC_SUPER_MAGIC 0x9fa0
-#define QNX4_SUPER_MAGIC 0x002f
-#define REISERFS_SUPER_MAGIC 0x52654973
-#define ROMFS_MAGIC 0x7275
-#define SMB_SUPER_MAGIC 0x517B
-#define SYSV2_SUPER_MAGIC 0x012FF7B6
-#define SYSV4_SUPER_MAGIC 0x012FF7B5
-#define TMPFS_MAGIC 0x01021994
-#define UDF_SUPER_MAGIC 0x15013346
-#define UFS_MAGIC 0x00011954
-#define USBDEVICE_SUPER_MAGIC 0x9fa2
-#define VXFS_SUPER_MAGIC 0xa501FCF5
-#define XENIX_SUPER_MAGIC 0x012FF7B4
-#define XFS_SUPER_MAGIC 0x58465342
-#define _XIAFS_SUPER_MAGIC 0x012FD16D
+/* Pull in the kernel magic numbers. */
+#include <linux/magic.h>
+/* Add in ones that we had historically that aren't in the uapi header. */
+#define BEFS_SUPER_MAGIC 0x42465331
+#define BFS_MAGIC 0x1BADFACE
+#define CIFS_MAGIC_NUMBER 0xFF534D42
+#define COH_SUPER_MAGIC 0x012FF7B7
+#define DEVFS_SUPER_MAGIC 0x1373
+#define EXT_SUPER_MAGIC 0x137D
+#define EXT2_OLD_SUPER_MAGIC 0xEF51
+#define HFS_SUPER_MAGIC 0x4244
+#define JFS_SUPER_MAGIC 0x3153464a
+#define NTFS_SB_MAGIC 0x5346544e
+#define ROMFS_MAGIC 0x7275
+#define SYSV2_SUPER_MAGIC 0x012FF7B6
+#define SYSV4_SUPER_MAGIC 0x012FF7B5
+#define UDF_SUPER_MAGIC 0x15013346
+#define UFS_MAGIC 0x00011954
+#define VXFS_SUPER_MAGIC 0xa501FCF5
+#define XENIX_SUPER_MAGIC 0x012FF7B4
+#define XFS_SUPER_MAGIC 0x58465342
extern int statfs(const char*, struct statfs*) __nonnull((1, 2));
extern int statfs64(const char*, struct statfs64*) __nonnull((1, 2));