From: Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
Subject: sys_lseek() broken for alpha
Date: Mon, 13 May 1996 17:35:32 +0200 (MET DST) [thread overview]
Message-ID: <9605131630.AA21546@nova.tat.physik.uni-tuebingen.de> (raw)
Hi,
sys_lseek() should return off_t which is long (64 bit) for alpha but
returns 32bit int. as a result, fdisk fails for >2GB disks.
from "strace fdisk" on alpha:
-------------------------------------------------------------------------------
lseek(4, 1720535040, SEEK_SET) = 1720535040
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(4, 2580802560, SEEK_SET) = -1 E??? (errno 1714164736)
write(2, "\n", 1) = 1
write(2, "Unable to seek on /dev/sdc\n", 27) = 27
-------------------------------------------------------------------------------
this fixes the fdisk problems with lseek above 2GB:
-------------------------------------------------------------------------------
--- linux/fs/read_write.c~ Mon May 13 14:55:27 1996
+++ linux/fs/read_write.c Mon May 13 14:55:38 1996
@@ -15,7 +15,7 @@
#include <asm/segment.h>
-asmlinkage int sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
+asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
{
struct file * file;
long tmp = -1;
-------------------------------------------------------------------------------
Harald
--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
next reply other threads:[~1996-05-13 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-13 15:35 Harald Koenig [this message]
1996-05-14 0:11 ` sys_lseek() broken for alpha Stephen C. Tweedie
[not found] <199605140011.BAA00734@dax.dcs.ed.ac.uk>
1996-05-14 9:38 ` Harald Koenig
1996-05-14 21:08 ` Chris Griffin
[not found] <Pine.SOL.3.91.960514170705.22221A-100000@vanadium>
1996-05-14 21:39 ` Harald Koenig
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox