patch-2.4.4 linux/fs/stat.c

Next file: linux/fs/super.c
Previous file: linux/fs/smbfs/proc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/fs/stat.c linux/fs/stat.c
@@ -4,6 +4,7 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
+#include <linux/config.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/file.h>
@@ -25,7 +26,7 @@
 }
 
 
-#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(__s390__) && !defined(__hppa__)
+#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(CONFIG_ARCH_S390) && !defined(__hppa__)
 
 /*
  * For backward compatibility?  Maybe this should be moved
@@ -38,7 +39,7 @@
 
 	if (warncount > 0) {
 		warncount--;
-		printk("VFS: Warning: %s using old stat() call. Recompile your binary.\n",
+		printk(KERN_WARNING "VFS: Warning: %s using old stat() call. Recompile your binary.\n",
 			current->comm);
 	} else if (warncount < 0) {
 		/* it's laughable, but... */
@@ -53,7 +54,7 @@
 	SET_OLDSTAT_GID(tmp, inode->i_gid);
 	tmp.st_rdev = kdev_t_to_nr(inode->i_rdev);
 #if BITS_PER_LONG == 32
-	if (inode->i_size > 0x7fffffff)
+	if (inode->i_size > MAX_NON_LFS)
 		return -EOVERFLOW;
 #endif	
 	tmp.st_size = inode->i_size;
@@ -79,7 +80,7 @@
 	SET_STAT_GID(tmp, inode->i_gid);
 	tmp.st_rdev = kdev_t_to_nr(inode->i_rdev);
 #if BITS_PER_LONG == 32
-	if (inode->i_size > 0x7fffffff)
+	if (inode->i_size > MAX_NON_LFS)
 		return -EOVERFLOW;
 #endif	
 	tmp.st_size = inode->i_size;
@@ -126,7 +127,7 @@
 }
 
 
-#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(__s390__) && !defined(__hppa__)
+#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(CONFIG_ARCH_S390) && !defined(__hppa__)
 /*
  * For backward compatibility?  Maybe this should be moved
  * into arch/i386 instead?
@@ -162,7 +163,7 @@
 	return error;
 }
 
-#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(__s390__) && !defined(__hppa__)
+#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(CONFIG_ARCH_S390) && !defined(__hppa__)
 
 /*
  * For backward compatibility?  Maybe this should be moved
@@ -200,7 +201,7 @@
 	return error;
 }
 
-#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(__s390__) && !defined(__hppa__)
+#if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) && !defined(CONFIG_ARCH_S390) && !defined(__hppa__)
 
 /*
  * For backward compatibility?  Maybe this should be moved
@@ -267,7 +268,7 @@
 
 
 /* ---------- LFS-64 ----------- */
-#if !defined(__alpha__) && !defined (__ia64__) && !defined(__mips64)
+#if !defined(__alpha__) && !defined(__ia64__) && !defined(__mips64) && !defined(CONFIG_ARCH_S390X)
 
 static long cp_new_stat64(struct inode * inode, struct stat64 * statbuf)
 {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)