* [meissner@suse.de: getdents patch for 32 -> 64 converter]
@ 2004-03-24 1:17 Anton Blanchard
0 siblings, 0 replies; only message in thread
From: Anton Blanchard @ 2004-03-24 1:17 UTC (permalink / raw)
To: linux-arch
Im guessing this fix will be required on other 64bit archs.
Anton
----- Forwarded message from Marcus Meissner <meissner@suse.de> -----
From: Marcus Meissner <meissner@suse.de>
To: linuxppc64-dev@lists.linuxppc.org
Subject: getdents patch for 32 -> 64 converter
Hi,
With 2.6.4 we now have the glorious hidden d_type passing in
getdents.
glibc CVS expects this to be passed if we have a kernel version after 2.6.4,
so we have to also handle it in the 32bit syscall converter.
The kernel at least bootet here and my testcase (bootstrap gcc)
works fine now.
Can someone please review / apply?
Ciao, Marcus
--- linux/arch/ppc64/kernel/sys_ppc32.c.dtype 2004-03-23 14:10:10.000000000 +0100
+++ linux/arch/ppc64/kernel/sys_ppc32.c 2004-03-23 14:11:02.000000000 +0100
@@ -534,7 +534,7 @@
{
struct linux_dirent32 * dirent;
struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf;
- int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+ int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2);
buf->error = -EINVAL; /* only used if we fail.. */
if (reclen > buf->count)
@@ -548,6 +548,7 @@
put_user(reclen, &dirent->d_reclen);
copy_to_user(dirent->d_name, name, namlen);
put_user(0, dirent->d_name + namlen);
+ put_user(d_type, (char *) dirent + reclen - 1);
((char *) dirent) += reclen;
buf->current_dir = dirent;
buf->count -= reclen;
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
----- End forwarded message -----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-24 1:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-24 1:17 [meissner@suse.de: getdents patch for 32 -> 64 converter] Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox