lkml.org 
[lkml]   [2002]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectlseek SEEK_END fails on a Toshiba 6007MB disk.
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>



main(int argc, char *argv[])
{
int fd;
int offset;
int loffset;

fd = open("/dev/hda", O_RDONLY);

if (fd < 0) {
perror("open");
return;
}

offset = lseek(fd, 0, SEEK_END);

if (offset < 0) {
perror("lseek");
}

}


# ./seek
lseek: Value too large for defined data type

The system runs 2.4.17 kernel.

A fix may be found reading the source code, but if someone already knows

the solution, please reply to me.

Kallol

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.025 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site