Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux move definition of struct linux_stafs to co...



details:   https://anonhg.NetBSD.org/src/rev/695fa8a854c4
branches:  trunk
changeset: 570051:695fa8a854c4
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Sep 19 15:06:32 2004 +0000

description:
move definition of struct linux_stafs to common/linux_types.h, and use
explicit size types - the structure definition is actually identical
on currently support COMPAT_LINUX archs, so no point to have 6 copies of it
in the tree

diffstat:

 sys/compat/linux/arch/alpha/linux_types.h   |  15 +--------------
 sys/compat/linux/arch/arm/linux_types.h     |  15 +--------------
 sys/compat/linux/arch/i386/linux_types.h    |  15 +--------------
 sys/compat/linux/arch/m68k/linux_types.h    |  15 +--------------
 sys/compat/linux/arch/mips/linux_types.h    |  19 +------------------
 sys/compat/linux/arch/powerpc/linux_types.h |  18 +-----------------
 sys/compat/linux/common/linux_types.h       |  25 +++++++++++++++++++++----
 7 files changed, 27 insertions(+), 95 deletions(-)

diffs (225 lines):

diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/alpha/linux_types.h
--- a/sys/compat/linux/arch/alpha/linux_types.h Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/alpha/linux_types.h Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.1 1998/09/30 21:36:30 erh Exp $      */
+/*     $NetBSD: linux_types.h,v 1.2 2004/09/19 15:06:32 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -59,19 +59,6 @@
 typedef        unsigned int  linux_speed_t;
 typedef unsigned int  linux_tcflag_t;
 
-struct linux_statfs {
-       int             l_ftype;
-       int             l_fbsize;
-       int             l_fblocks;
-       int             l_fbfree;
-       int             l_fbavail;
-       int             l_ffiles;
-       int             l_fffree;
-       linux_fsid_t    l_ffsid;
-       int             l_fnamelen;
-       int             l_fspare[6];
-};
-
 struct linux_stat {
        linux_dev_t             lst_dev;
        linux_ino_t             lst_ino;
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/arm/linux_types.h
--- a/sys/compat/linux/arch/arm/linux_types.h   Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/arm/linux_types.h   Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.3 2002/05/19 18:03:16 jdolecek Exp $ */
+/*     $NetBSD: linux_types.h,v 1.4 2004/09/19 15:06:32 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -59,19 +59,6 @@
 typedef unsigned long linux_speed_t;
 typedef unsigned long linux_tcflag_t;
 
-struct linux_statfs {
-       long            l_ftype;
-       long            l_fbsize;
-       long            l_fblocks;
-       long            l_fbfree;
-       long            l_fbavail;
-       long            l_ffiles;
-       long            l_fffree;
-       linux_fsid_t    l_ffsid;
-       long            l_fnamelen;
-       long            l_fspare[6];
-};
-
 struct linux_stat {
        linux_dev_t             lst_dev;
        unsigned short          pad1;
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/i386/linux_types.h
--- a/sys/compat/linux/arch/i386/linux_types.h  Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/i386/linux_types.h  Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.10 2002/05/19 18:03:15 jdolecek Exp $        */
+/*     $NetBSD: linux_types.h,v 1.11 2004/09/19 15:06:32 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -59,19 +59,6 @@
 typedef unsigned long linux_speed_t;
 typedef unsigned long linux_tcflag_t;
 
-struct linux_statfs {
-       long            l_ftype;
-       long            l_fbsize;
-       long            l_fblocks;
-       long            l_fbfree;
-       long            l_fbavail;
-       long            l_ffiles;
-       long            l_fffree;
-       linux_fsid_t    l_ffsid;
-       long            l_fnamelen;
-       long            l_fspare[6];
-};
-
 struct linux_stat {
        linux_dev_t             lst_dev;
        unsigned short          pad1;
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/m68k/linux_types.h
--- a/sys/compat/linux/arch/m68k/linux_types.h  Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/m68k/linux_types.h  Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.4 2002/05/19 18:03:17 jdolecek Exp $ */
+/*     $NetBSD: linux_types.h,v 1.5 2004/09/19 15:06:32 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -59,19 +59,6 @@
 typedef unsigned int linux_speed_t;
 typedef unsigned int linux_tcflag_t;
 
-struct linux_statfs {
-       long            l_ftype;
-       long            l_fbsize;
-       long            l_fblocks;
-       long            l_fbfree;
-       long            l_fbavail;
-       long            l_ffiles;
-       long            l_fffree;
-       linux_fsid_t    l_ffsid;
-       long            l_fnamelen;
-       long            l_fspare[6];
-};
-
 struct linux_stat {
        linux_dev_t             lst_dev;
        unsigned short          pad1;
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/mips/linux_types.h
--- a/sys/compat/linux/arch/mips/linux_types.h  Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/mips/linux_types.h  Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.5 2002/02/17 23:57:57 rafal Exp $ */
+/*     $NetBSD: linux_types.h,v 1.6 2004/09/19 15:06:32 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
@@ -78,23 +78,6 @@
 typedef unsigned long linux_tcflag_t;
 #endif
 
-/* 
- * From Linux's include/asm-mips/statfs.h 
- */
-struct linux_statfs {
-       long l_ftype;      /* Linux name -> NetBSD Linux emul name: s/f_/I_f/ */
-       long l_fbsize;  
-       long l_ffrsize; 
-       long l_fblocks; 
-       long l_fbfree;  
-       long l_ffiles;  
-       long l_fffree;  
-       long l_fbavail; 
-       linux_fsid_t l_ffsid;   
-       long l_fnamelen;        
-       long l_fspare[6];       
-};
-
 #if defined(ELFSIZE) && (ELFSIZE == 64)
 /* 
  * From Linux's include/asm-mips64/stat.h
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/arch/powerpc/linux_types.h
--- a/sys/compat/linux/arch/powerpc/linux_types.h       Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/arch/powerpc/linux_types.h       Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.2 2001/01/20 10:36:05 manu Exp $ */
+/*     $NetBSD: linux_types.h,v 1.3 2004/09/19 15:06:32 jdolecek Exp $ */
 
 /*-
  * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
@@ -65,22 +65,6 @@
 typedef unsigned int linux_tcflag_t;
 
 /* 
- * From Linux's include/asm-ppc/statfs.h 
- */
-struct linux_statfs {
-       long l_ftype;      /* Linux name -> NetBSD Linux emul name: s/f_/I_f/ */
-       long l_fbsize;  
-       long l_fblocks; 
-       long l_fbfree;  
-       long l_fbavail; 
-       long l_ffiles;  
-       long l_fffree;  
-       linux_fsid_t l_ffsid;   
-       long l_fnamelen;        
-       long l_fspare[6];       
-};
-
-/* 
  * From Linux's include/asm-ppc/stat.h 
  */
 struct linux_stat {  /* warning: there is also a old_kernel_stat in Linux*/
diff -r a6344e137b73 -r 695fa8a854c4 sys/compat/linux/common/linux_types.h
--- a/sys/compat/linux/common/linux_types.h     Sun Sep 19 12:22:22 2004 +0000
+++ b/sys/compat/linux/common/linux_types.h     Sun Sep 19 15:06:32 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_types.h,v 1.15 2002/10/10 07:25:21 thorpej Exp $ */
+/*     $NetBSD: linux_types.h,v 1.16 2004/09/19 15:06:32 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -47,9 +47,6 @@
 #include <compat/linux/arch/powerpc/linux_types.h>
 #elif defined(__arm__)
 #include <compat/linux/arch/arm/linux_types.h>
-/*
- * The rest are not written yet:
- */
 #elif defined(__m68k__)
 #include <compat/linux/arch/m68k/linux_types.h>
 #elif defined(__mips__)
@@ -99,4 +96,24 @@
 
 #include <compat/linux/common/linux_siginfo.h>
 
+/*
+ * From Linux include/asm-generic/statfs.h
+ * This is _almost_ generic - Linux/sparc64 uses different (fully 64bit)
+ * struct statfs. However, we don't support Linux/sparc64 ATM.
+ */
+#ifndef __sparc64__
+struct linux_statfs {
+       u_int32_t       l_ftype;
+       u_int32_t       l_fbsize;
+       u_int32_t       l_fblocks;
+       u_int32_t       l_fbfree;
+       u_int32_t       l_fbavail;
+       u_int32_t       l_ffiles;
+       u_int32_t       l_fffree;
+       linux_fsid_t    l_ffsid;
+       u_int32_t       l_fnamelen;
+       u_int32_t       l_fspare[6];
+};
+#endif /* !__sparc64__ */
+
 #endif /* !_LINUX_TYPES_H */



Home | Main Index | Thread Index | Old Index