Subject: files > 2GB on fat32
To: None <current-users@netbsd.org, port-amd64@netbsd.org>
From: Christian Groessler <cpg@aladdin.de>
List: port-amd64
Date: 11/28/2006 22:12:25
Hi,

I have an amd64 machine which has a FAT32 partition shared by Windows,
Linux, and NetBSD.

On the FAT32 partition there is a file with size ~4GB.

"ls -l" on NetBSD reports wrong file size:

-rw-r--r--  1 chris  chris  18446744073455962112 Nov 12 22:18 back-cd.iso

On Linux (and Windows):

-rw-r--r-- 1 chris chris 4041377792 Nov 12 22:18 back-cd.iso


4041377792 is 0xF0E28800, 18446744073455962112 is 0xFFFFFFFFF0E28800.

Looks like the file size is declared as signed on NetBSD and gets
sign-extended to 64bit.

This is on -current as of today.

regards,
chris