From: "David S. Miller" <davem@davemloft.net>
To: linux-kernel@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Subject: [PATCH] Fix compat stat handling on sparc64
Date: Tue, 5 Apr 2005 13:57:37 -0700 [thread overview]
Message-ID: <20050405135737.0a413358.davem@davemloft.net> (raw)
The compat layer on sparc64 was not filling in the nanosecond
fields in properly for 32-bit compat tasks. This caused things
like the test-utime.c test to fail in the libc sources.
A problem still remains for native 64-bit binaries. Like Alpha
the normal stat structure doesn't have the nanosecond fields
so I have to add in the stat64 syscall entry points in the 64-bit
syscall table then add the necessary libc magic.
Signed-off-by: David S. Miller <davem@davemloft.net>
===== arch/sparc64/kernel/sys_sparc32.c 1.118 vs edited =====
--- 1.118/arch/sparc64/kernel/sys_sparc32.c 2005-03-21 09:56:06 -08:00
+++ edited/arch/sparc64/kernel/sys_sparc32.c 2005-04-05 12:38:54 -07:00
@@ -352,11 +352,11 @@
err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev);
err |= put_user(stat->size, &statbuf->st_size);
err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
- err |= put_user(0, &statbuf->__unused1);
+ err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec);
err |= put_user(stat->mtime.tv_sec, &statbuf->st_mtime);
- err |= put_user(0, &statbuf->__unused2);
+ err |= put_user(stat->mtime.tv_nsec, &statbuf->st_mtime_nsec);
err |= put_user(stat->ctime.tv_sec, &statbuf->st_ctime);
- err |= put_user(0, &statbuf->__unused3);
+ err |= put_user(stat->ctime.tv_nsec, &statbuf->st_ctime_nsec);
err |= put_user(stat->blksize, &statbuf->st_blksize);
err |= put_user(stat->blocks, &statbuf->st_blocks);
err |= put_user(0, &statbuf->__unused4[0]);
===== include/asm-sparc64/compat.h 1.19 vs edited =====
--- 1.19/include/asm-sparc64/compat.h 2005-02-17 21:53:03 -08:00
+++ edited/include/asm-sparc64/compat.h 2005-04-05 12:37:58 -07:00
@@ -51,11 +51,11 @@
compat_dev_t st_rdev;
compat_off_t st_size;
compat_time_t st_atime;
- u32 __unused1;
+ u32 st_atime_nsec;
compat_time_t st_mtime;
- u32 __unused2;
+ u32 st_mtime_nsec;
compat_time_t st_ctime;
- u32 __unused3;
+ u32 st_ctime_nsec;
compat_off_t st_blksize;
compat_off_t st_blocks;
u32 __unused4[2];
next reply other threads:[~2005-04-05 21:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 20:57 David S. Miller [this message]
2005-04-05 23:52 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050405135737.0a413358.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®