Hi Tom,

> I used llseek AND kernel2.4.0-test12 to seek /dev/hda
> so all conditions you specified were true,
> but that failed for seeks larger than 2Gb.
> I probably made a mistake somewhere.

Strange.   Could you try running this simple test program?
I'm able to access all of my 20Gb harddisk this way, even
under my ancient 2.0.36 kernel ...

Bye,
Ulrich

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main( void )
{
    char buf[0x100];
    int fd, count;
    loff_t off, target;

    fd = open( "/dev/hda", O_RDONLY );
    if ( fd < 0 )
    {
        perror( "open" );
        exit( 1 );
    }

    target = (loff_t)(1ULL << 32);

    off = llseek( fd, target, SEEK_SET );
    printf( "off = 0x%llx\n", off );
    if ( off != target )
    {
        perror( "llseek" );
        exit( 1 );
    }

    count = read( fd, buf, 0x100 );
    printf( "count = %d\n", count );
    if ( count != 0x100 );
    {
        perror( "read" );
        exit( 1 );
    }

    return 0;
}



-- 
  Dr. Ulrich Weigand
  [EMAIL PROTECTED]

Reply via email to