Mailing List archive

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

[vdr] Re: Problem with large drives?



Klaus Schmidinger wrote:
> 
> Klaus Schmidinger wrote:
> >
> > Ulrich Petri wrote:
> > >
> > > Hi,
> > >
> > > I just mounted my 120Gb Windows drive over smb to /video3.
> > > Since then vdr exits with "Folating point exception" when i enter the
> > > main menu (seems to be the free space clacing).
> > > A friend also experienced this (he used a 80Gb drive, also mounted over
> > > smb), he repartioned to 2x40gb and the problems where gone.
> > >
> > > I don't know if this is smb related.
> > > Has any one of you used drives of that size "in one piece" succesfully?
> >
> > There may be a problem with a value returned from the statfs().
> >
> > Could you please insert the following lines into FreeDiskSpaceMB() (in tools.c)?
> >
> >  int FreeDiskSpaceMB(const char *Directory, int *UsedMB)
> >  {
> >    if (UsedMB)
> >       *UsedMB = 0;
> >    int Free = 0;
> >    struct statfs statFs;
> >    if (statfs(Directory, &statFs) == 0) {
> > +     dsyslog(LOG_INFO, "statFs.f_bsize = %d", statFs.f_bsize);
> >       int blocksPerMeg = 1024 * 1024 / statFs.f_bsize;
> > +     if (blocksPerMeg == 0)
> > +        blocksPerMeg = 1; // just to have something != 0
> >       if (UsedMB)
> >          *UsedMB = (statFs.f_blocks - statFs.f_bfree) / blocksPerMeg;
> >       Free = statFs.f_bavail / blocksPerMeg;
> >       }
> >    else
> >       LOG_ERROR_STR(Directory);
> >    return Free;
> >  }
> >
> > With this it should list statFs.f_bsize in the log file and take care
> > of blocksPerMeg perhaps becoming 0. Mabe the block size on your very large
> > disk is larger than 1MB (just a thought).
> >
> > Please let me know the result.
> >
> > Klaus
> 
> Any news on this one? I'd like to fix this for version 1.0.2 if necessary.
> 
> Klaus

Coud the original poster of this problem report please try the suggested
modifications and let me know what happens?

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index