Re: [PATCH] Fix compat stat handling on sparc64
Hi Dave, On Tue, 5 Apr 2005 13:57:37 -0700 "David S. Miller" <[EMAIL PROTECTED]> wrote: > > --- 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_tst_rdev; > compat_off_tst_size; > compat_time_t st_atime; > - u32 __unused1; > + u32 st_atime_nsec; Surely you meant to put compat_ulong_t instead of u32 ... :-) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpldPR24lPfz.pgp Description: PGP signature
[PATCH] Fix compat stat handling on sparc64
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 <[EMAIL PROTECTED]> = 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.c2005-04-05 12:38:54 -07:00 @@ -352,11 +352,11 @@ err |= put_user(old_encode_dev(stat->rdev), >st_rdev); err |= put_user(stat->size, >st_size); err |= put_user(stat->atime.tv_sec, >st_atime); - err |= put_user(0, >__unused1); + err |= put_user(stat->atime.tv_nsec, >st_atime_nsec); err |= put_user(stat->mtime.tv_sec, >st_mtime); - err |= put_user(0, >__unused2); + err |= put_user(stat->mtime.tv_nsec, >st_mtime_nsec); err |= put_user(stat->ctime.tv_sec, >st_ctime); - err |= put_user(0, >__unused3); + err |= put_user(stat->ctime.tv_nsec, >st_ctime_nsec); err |= put_user(stat->blksize, >st_blksize); err |= put_user(stat->blocks, >st_blocks); err |= put_user(0, >__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_tst_rdev; compat_off_tst_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_tst_blksize; compat_off_tst_blocks; u32 __unused4[2]; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Fix compat stat handling on sparc64
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 [EMAIL PROTECTED] = 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.c2005-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_tst_rdev; compat_off_tst_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_tst_blksize; compat_off_tst_blocks; u32 __unused4[2]; - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Fix compat stat handling on sparc64
Hi Dave, On Tue, 5 Apr 2005 13:57:37 -0700 David S. Miller [EMAIL PROTECTED] wrote: --- 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_tst_rdev; compat_off_tst_size; compat_time_t st_atime; - u32 __unused1; + u32 st_atime_nsec; Surely you meant to put compat_ulong_t instead of u32 ... :-) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpldPR24lPfz.pgp Description: PGP signature