Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Problem with large drives?



Klaus Schmidinger wrote:
> 
> Please try the following patch to tools.c:
> 
> --- tools.c     2002/03/31 20:51:06     1.62
> +++ tools.c     2002/05/01 16:17:17
> @@ -251,10 +251,10 @@
>    int Free = 0;
>    struct statfs statFs;
>    if (statfs(Directory, &statFs) == 0) {
> -     int blocksPerMeg = 1024 * 1024 / statFs.f_bsize;
> +     double blocksPerMeg = 1024.0 * 1024.0 / statFs.f_bsize;
>       if (UsedMB)
> -        *UsedMB = (statFs.f_blocks - statFs.f_bfree) / blocksPerMeg;
> -     Free = statFs.f_bavail / blocksPerMeg;
> +        *UsedMB = int((statFs.f_blocks - statFs.f_bfree) / 
> blocksPerMeg);
> +     Free = int(statFs.f_bavail / blocksPerMeg);
>       }
>    else
>       LOG_ERROR_STR(Directory);
> 
> Klaus

Thanks!
Now the time is displayed ok i think

/dev/hdb3              2893660   1037436   1709232  38% /video0
/dev/hda1             10536328   5124288   5412040  49% /video1
/dev/hdc1             26759200  22536960   4222240  85% /video2
//192.168.0.1/vdr    120092672 110159872   9932800  92% /video3

Results in 13h:26m which is correct IMHO.

Cu Ulrich




Home | Main Index | Thread Index