On Wed, Nov 01, 2006 at 03:21:20PM +0100, KELEMEN Peter wrote:
> * Radovan Garabik ([EMAIL PROTECTED]) [20061101 15:06]:
> 
> > Could you run these commands and send me the output?
> 
> % stat -f /afs
>   File: "/afs"
>     ID: 6300001234 Namelen: 256     Type: UNKNOWN (0x0)
> Block size: 4117466368 Fundamental block size: 4117466368
> Blocks: Total: 9000000    Free: 9000000    Available: 9000000
> Inodes: Total: 9000000    Free: 9000000
> % python -c 'import os; print os.statvfs("/afs")'
> (-177500928, -177500928, 9000000L, 9000000L, 9000000L, 9000000L, 9000000L, 
> 9000000L, 0, 256)
> 

This is obviously a bug in python, the first two number should never be
negative (the statvfs structure has unsigned long here). 
2**32-4117466368=177500928, therefore python probably tries to put the
struct members into signed int and overflows.
You should probably file a bug against python.
Anyway, I am going to modify pydf to ignore these bogus numbers.

-- 
 -----------------------------------------------------------
| Radovan GarabĂ­k http://kassiopeia.juls.savba.sk/~garabik/ |
| __..--^^^--..__    garabik @ kassiopeia.juls.savba.sk     |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!

Reply via email to