From a0e8034d20443e9652245e4fd5350c9716fe7786 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 25 Jul 1998 05:46:56 +0000 Subject: [PATCH] Explicitly code the Linux superblock magic constants in this file. The previous trick of reading various kernel header files no longer works when linking with glibc2, because there are symbol conflicts between the kernel and glibc2. --- v7/src/microcode/uxfs.c | 79 ++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/v7/src/microcode/uxfs.c b/v7/src/microcode/uxfs.c index 36bac9073..e3a829c86 100644 --- a/v7/src/microcode/uxfs.c +++ b/v7/src/microcode/uxfs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: uxfs.c,v 1.15 1998/06/18 19:13:42 cph Exp $ +$Id: uxfs.c,v 1.16 1998/07/25 05:46:56 cph Exp $ Copyright (c) 1990-98 Massachusetts Institute of Technology @@ -39,33 +39,42 @@ MIT in each case. */ #include #ifdef __linux -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if 0 /* Broken -- requires __KERNEL__ defined. */ -#include -#include -#if (LINUX_VERSION_CODE >= 66304) /* 1.3.0 (is this correct?) */ -#include -#if (LINUX_VERSION_CODE >= 66387) /* 1.3.53 */ -#include +/* The following superblock magic constants are taken from the kernel + headers for Linux 2.0.33. We use these rather than reading the + header files, because the Linux kernel header files have + definitions that conflict with those of glibc2. These constants + are unlikely to be changed, so this ought to be safe. */ + +#ifndef AFFS_SUPER_MAGIC +#define AFFS_SUPER_MAGIC 0xadff #endif + +#ifndef COH_SUPER_MAGIC +#define COH_SUPER_MAGIC 0x012FF7B7 #endif + +#ifndef EXT_SUPER_MAGIC +#define EXT_SUPER_MAGIC 0x137D #endif -/* Explicitly code various constants that are, for one reason or - another, possibly unavailable. These constants are unlikely to be - changed, so this ought to be safe. */ +#ifndef EXT2_SUPER_MAGIC +#define EXT2_SUPER_MAGIC 0xEF53 +#endif -#ifndef AFFS_SUPER_MAGIC -#define AFFS_SUPER_MAGIC 0xadff +#ifndef HPFS_SUPER_MAGIC +#define HPFS_SUPER_MAGIC 0xf995e849 +#endif + +#ifndef ISOFS_SUPER_MAGIC +#define ISOFS_SUPER_MAGIC 0x9660 +#endif + +#ifndef MINIX_SUPER_MAGIC +#define MINIX_SUPER_MAGIC 0x137F +#endif + +#ifndef MINIX_SUPER_MAGIC2 +#define MINIX_SUPER_MAGIC2 0x138F #endif #ifndef MINIX2_SUPER_MAGIC @@ -76,6 +85,10 @@ MIT in each case. */ #define MINIX2_SUPER_MAGIC2 0x2478 #endif +#ifndef MSDOS_SUPER_MAGIC +#define MSDOS_SUPER_MAGIC 0x4d44 +#endif + #ifndef NCP_SUPER_MAGIC #define NCP_SUPER_MAGIC 0x564c #endif @@ -84,6 +97,10 @@ MIT in each case. */ #define NFS_SUPER_MAGIC 0x6969 #endif +#ifndef NTFS_SUPER_MAGIC +#define NTFS_SUPER_MAGIC 0x5346544E +#endif + #ifndef PROC_SUPER_MAGIC #define PROC_SUPER_MAGIC 0x9fa0 #endif @@ -92,24 +109,20 @@ MIT in each case. */ #define SMB_SUPER_MAGIC 0x517B #endif -#ifndef XENIX_SUPER_MAGIC -#define XENIX_SUPER_MAGIC 0x012FF7B4 +#ifndef SYSV2_SUPER_MAGIC +#define SYSV2_SUPER_MAGIC 0x012FF7B6 #endif #ifndef SYSV4_SUPER_MAGIC #define SYSV4_SUPER_MAGIC 0x012FF7B5 #endif -#ifndef SYSV2_SUPER_MAGIC -#define SYSV2_SUPER_MAGIC 0x012FF7B6 -#endif - -#ifndef COH_SUPER_MAGIC -#define COH_SUPER_MAGIC 0x012FF7B7 +#ifndef XENIX_SUPER_MAGIC +#define XENIX_SUPER_MAGIC 0x012FF7B4 #endif -#ifndef NTFS_SUPER_MAGIC -#define NTFS_SUPER_MAGIC 0x5346544E +#ifndef _XIAFS_SUPER_MAGIC +#define _XIAFS_SUPER_MAGIC 0x012FD16D #endif #endif /* __linux */ -- 2.25.1