This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH 1/1] statfs64 should be weak-aliased to statfs on mips64/n64 as on X86-64
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: rongqing dot li at windriver dot com
- Cc: libc-ports at sourceware dot org
- Date: Tue, 6 Sep 2011 14:07:42 +0000 (UTC)
- Subject: Re: [PATCH 1/1] statfs64 should be weak-aliased to statfs on mips64/n64 as on X86-64
- References: <1313747458-27639-1-git-send-email-rongqing.li@windriver.com>
On Fri, 19 Aug 2011, rongqing.li@windriver.com wrote:
> diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
> index 8d70e45..a93943d 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
> @@ -5,3 +5,4 @@ sync_file_range - sync_file_range Ci:iiii sync_file_range
> prlimit EXTRA prlimit64 i:iipp prlimit prlimit64
>
> fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark
> +statfs - statfs i:sp __statfs statfs statfs64
I don't think this is the complete fix. You're not defining an __statfs64
alias so statvfs64 will continue to use the old, bad __statfs64, and
you're not fixing fstatfs64 or doing anything to stop the old statfs64 and
fstatfs64 being built.
This is the patch I've applied which fixes those issues. It should be
possible to make statvfs64 and fstatvfs64 into aliases of statvfs and
fstatvfs (since they don't use struct stat64 - different from struct stat
on MIPS n64 - in their interfaces) but I haven't tried that and the
existing implementations of those functions should work anyway.
diff --git a/ChangeLog.mips b/ChangeLog.mips
index b2998b8..75f87fe 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,11 @@
+2011-09-06 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #13109]
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (fstatfs)
+ (statfs): New.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: New.
+
2011-08-02 Matt Turner <mattst88@gmail.com>
* sysdeps/mips/bits/atomic.h: Workaround R10K ll/sc errata.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
@@ -0,0 +1 @@
+/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
@@ -0,0 +1 @@
+/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
index 8d70e45..c94fe75 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
@@ -5,3 +5,6 @@ sync_file_range - sync_file_range Ci:iiii sync_file_range
prlimit EXTRA prlimit64 i:iipp prlimit prlimit64
fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark
+
+fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
+statfs - statfs i:sp __statfs statfs statfs64 __statfs64
--
Joseph S. Myers
joseph@codesourcery.com