Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Nov 2007 21:06:59 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        "Mikhail T." <mi@aldan.algebra.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Linux SDL still broken - even on i386 (Re: something wrong with Linux on 6.2-stable/amd64)
Message-ID:  <20071124210659.284287be@deskjail>
References:  <20071123114950.rucek9z1d5w4ksk4@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--MP_72_I5Yjo.VVbSxEBYD+EPov
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Quoting "Mikhail T." <mi@aldan.algebra.com> (Fri, 23 Nov 2007 17:28:32 +0000):

> I tried sync-ing the directories listed there to RELENG_7, but that would not 
> compile on 6.3 :(
> 
> Could you construct a patch against RELENG_6 -- you would need it anyway, if 
> the problem is to be fixed in 6.3-RELEASED...

Attached.

Bye,
Alexander.

-- 
What kind of love is that?  Not to be loved; never to have shown love.
		-- Commissioner Nancy Hedford, "Metamorphosis",
		   stardate 3219.8
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137

--MP_72_I5Yjo.VVbSxEBYD+EPov
Content-Type: text/x-patch; name=linux_statfs64.diff
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=linux_statfs64.diff

Index: amd64/linux32/linux.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/amd64/linux32/linux.h,v
retrieving revision 1.1.8.3
diff -u -p -u -r1.1.8.3 linux.h
--- amd64/linux32/linux.h	8 Jul 2007 12:20:35 -0000	1.1.8.3
+++ amd64/linux32/linux.h	24 Nov 2007 20:00:53 -0000
@@ -242,6 +242,19 @@ struct l_stat64 {
 	l_ulonglong	st_ino;
 } __packed;
 
+struct l_statfs64 { 
+        l_int           f_type; 
+        l_int           f_bsize; 
+        uint64_t        f_blocks; 
+        uint64_t        f_bfree; 
+        uint64_t        f_bavail; 
+        uint64_t        f_files; 
+        uint64_t        f_ffree; 
+        l_fsid_t        f_fsid;
+        l_int           f_namelen;
+        l_int           f_spare[6];
+} __packed;
+
 struct l_new_utsname {
 	char	sysname[LINUX_MAX_UTSNAME];
 	char	nodename[LINUX_MAX_UTSNAME];
Index: amd64/linux32/linux32_proto.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/amd64/linux32/linux32_proto.h,v
retrieving revision 1.5.2.3
diff -u -p -u -r1.5.2.3 linux32_proto.h
--- amd64/linux32/linux32_proto.h	29 Aug 2007 15:05:36 -0000	1.5.2.3
+++ amd64/linux32/linux32_proto.h	24 Nov 2007 20:04:33 -0000
@@ -2,7 +2,7 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.5.2.3 2007/08/29 15:05:36 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.3 2007/08/29 15:04:25 netchild Exp 
  */
 
@@ -729,6 +729,7 @@ struct linux_clock_nanosleep_args {
 };
 struct linux_statfs64_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+	char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)];
 	char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)];
 };
 struct linux_fstatfs64_args {
Index: amd64/linux32/linux32_syscall.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/amd64/linux32/linux32_syscall.h,v
retrieving revision 1.5.2.3
diff -u -p -u -r1.5.2.3 linux32_syscall.h
--- amd64/linux32/linux32_syscall.h	29 Aug 2007 15:05:36 -0000	1.5.2.3
+++ amd64/linux32/linux32_syscall.h	24 Nov 2007 20:04:33 -0000
@@ -2,7 +2,7 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.5.2.3 2007/08/29 15:05:36 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.3 2007/08/29 15:04:25 netchild Exp 
  */
 
Index: amd64/linux32/linux32_sysent.c
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/amd64/linux32/linux32_sysent.c,v
retrieving revision 1.5.2.3
diff -u -p -u -r1.5.2.3 linux32_sysent.c
--- amd64/linux32/linux32_sysent.c	29 Aug 2007 15:05:36 -0000	1.5.2.3
+++ amd64/linux32/linux32_sysent.c	24 Nov 2007 20:04:33 -0000
@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.5.2.3 2007/08/29 15:05:36 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.4.2.3 2007/08/29 15:04:25 netchild Exp 
  */
 
Index: amd64/linux32/syscalls.master
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/amd64/linux32/syscalls.master,v
retrieving revision 1.4.2.3
diff -u -p -u -r1.4.2.3 syscalls.master
--- amd64/linux32/syscalls.master	29 Aug 2007 15:04:25 -0000	1.4.2.3
+++ amd64/linux32/syscalls.master	24 Nov 2007 20:02:45 -0000
@@ -439,6 +439,7 @@
 				    int flags, struct l_timespec *rqtp, \
 				    struct l_timespec *rmtp); }
 268	AUE_NULL	MSTD	{ int linux_statfs64(char *path, \
+				    size_t bufsize, \
 				    struct l_statfs64_buf *buf); }
 269	AUE_NULL	MSTD	{ int linux_fstatfs64(void); }
 270	AUE_NULL	MSTD	{ int linux_tgkill(int tgid, int pid, int sig); }
Index: compat/linux/linux_stats.c
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/compat/linux/linux_stats.c,v
retrieving revision 1.72.2.6
diff -u -p -u -r1.72.2.6 linux_stats.c
--- compat/linux/linux_stats.c	3 Sep 2007 13:18:42 -0000	1.72.2.6
+++ compat/linux/linux_stats.c	24 Nov 2007 20:03:47 -0000
@@ -313,19 +313,6 @@ struct l_statfs {
 	l_int		f_spare[6];
 };
 
-struct l_statfs64 {
-	l_int		f_type;
-	l_int		f_bsize;
-	uint64_t	f_blocks;
-	uint64_t	f_bfree;
-	uint64_t	f_bavail;
-	uint64_t	f_files;
-	uint64_t	f_ffree;
-	l_fsid_t	f_fsid;
-	l_int		f_namelen;
-	l_int		f_spare[6];
-};
-
 #define	LINUX_CODA_SUPER_MAGIC	0x73757245L
 #define	LINUX_EXT2_SUPER_MAGIC	0xEF53L
 #define	LINUX_HPFS_SUPER_MAGIC	0xf995e849L
@@ -425,6 +412,9 @@ linux_statfs64(struct thread *td, struct
 	char *path;
 	int error;
 
+	if (args->bufsize != sizeof(struct l_statfs64))
+		return EINVAL;
+
 	LCONVPATHEXIST(td, args->path, &path);
 
 #ifdef DEBUG
Index: i386/linux/linux.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/i386/linux/linux.h,v
retrieving revision 1.64.2.4
diff -u -p -u -r1.64.2.4 linux.h
--- i386/linux/linux.h	30 Aug 2007 07:22:20 -0000	1.64.2.4
+++ i386/linux/linux.h	24 Nov 2007 20:04:17 -0000
@@ -217,6 +217,19 @@ struct l_stat64 {
 	l_ulonglong	st_ino;
 };
 
+struct l_statfs64 { 
+        l_int           f_type; 
+        l_int           f_bsize; 
+        uint64_t        f_blocks; 
+        uint64_t        f_bfree; 
+        uint64_t        f_bavail; 
+        uint64_t        f_files; 
+        uint64_t        f_ffree; 
+        l_fsid_t        f_fsid;
+        l_int           f_namelen;
+        l_int           f_spare[6];
+};
+
 struct l_new_utsname {
 	char	sysname[LINUX_MAX_UTSNAME];
 	char	nodename[LINUX_MAX_UTSNAME];
Index: i386/linux/linux_proto.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/i386/linux/linux_proto.h,v
retrieving revision 1.64.2.3
diff -u -p -u -r1.64.2.3 linux_proto.h
--- i386/linux/linux_proto.h	29 Aug 2007 15:05:35 -0000	1.64.2.3
+++ i386/linux/linux_proto.h	24 Nov 2007 20:04:26 -0000
@@ -2,7 +2,7 @@
  * System call prototypes.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.64.2.3 2007/08/29 15:05:35 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.3 2007/08/29 15:04:26 netchild Exp 
  */
 
@@ -778,6 +778,7 @@ struct linux_clock_nanosleep_args {
 };
 struct linux_statfs64_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
+	char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)];
 	char buf_l_[PADL_(struct l_statfs64_buf *)]; struct l_statfs64_buf * buf; char buf_r_[PADR_(struct l_statfs64_buf *)];
 };
 struct linux_fstatfs64_args {
Index: i386/linux/linux_syscall.h
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/i386/linux/linux_syscall.h,v
retrieving revision 1.58.2.3
diff -u -p -u -r1.58.2.3 linux_syscall.h
--- i386/linux/linux_syscall.h	29 Aug 2007 15:05:35 -0000	1.58.2.3
+++ i386/linux/linux_syscall.h	24 Nov 2007 20:04:26 -0000
@@ -2,7 +2,7 @@
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.58.2.3 2007/08/29 15:05:35 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.3 2007/08/29 15:04:26 netchild Exp 
  */
 
Index: i386/linux/linux_sysent.c
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/i386/linux/linux_sysent.c,v
retrieving revision 1.65.2.3
diff -u -p -u -r1.65.2.3 linux_sysent.c
--- i386/linux/linux_sysent.c	29 Aug 2007 15:05:35 -0000	1.65.2.3
+++ i386/linux/linux_sysent.c	24 Nov 2007 20:04:26 -0000
@@ -2,7 +2,7 @@
  * System call switch table.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.65.2.3 2007/08/29 15:05:35 netchild Exp $
+ * $FreeBSD$
  * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.61.2.3 2007/08/29 15:04:26 netchild Exp 
  */
 
Index: i386/linux/syscalls.master
===================================================================
RCS file: /import/FreeBSD-CVS/src/sys/i386/linux/syscalls.master,v
retrieving revision 1.61.2.3
diff -u -p -u -r1.61.2.3 syscalls.master
--- i386/linux/syscalls.master	29 Aug 2007 15:04:26 -0000	1.61.2.3
+++ i386/linux/syscalls.master	24 Nov 2007 20:03:05 -0000
@@ -443,6 +443,7 @@
 				    int flags, struct l_timespec *rqtp, \
 				    struct l_timespec *rmtp); }
 268	AUE_NULL	MSTD	{ int linux_statfs64(char *path, \
+				    size_t bufsize, \
 				    struct l_statfs64_buf *buf); }
 269	AUE_NULL	MSTD	{ int linux_fstatfs64(void); }
 270	AUE_NULL	MSTD	{ int linux_tgkill(int tgid, int pid, int sig); }

--MP_72_I5Yjo.VVbSxEBYD+EPov--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071124210659.284287be>