/* ######################################################################
CDROM Utilities - Some functions to manipulate CDROM mounts.
/* ######################################################################
CDROM Utilities - Some functions to manipulate CDROM mounts.
struct stat Buf,Buf2;
if (stat(Path.c_str(),&Buf) != 0 ||
stat((Path + "../").c_str(),&Buf2) != 0)
struct stat Buf,Buf2;
if (stat(Path.c_str(),&Buf) != 0 ||
stat((Path + "../").c_str(),&Buf2) != 0)
/* Run over the directory, we assume that the reader order will never
change as the media is read-only. In theory if the kernel did
/* Run over the directory, we assume that the reader order will never
change as the media is read-only. In theory if the kernel did
// Some stats from the fsys
if (_config->FindB("Debug::identcdrom",false) == false)
{
// Some stats from the fsys
if (_config->FindB("Debug::identcdrom",false) == false)
{
- struct statfs Buf;
- if (statfs(CD.c_str(),&Buf) != 0)
- return _error->Errno("statfs","Failed to stat the cdrom");
+ struct statvfs Buf;
+ if (statvfs(CD.c_str(),&Buf) != 0)
+ return _error->Errno("statfs",_("Failed to stat the cdrom"));
// We use a kilobyte block size to advoid overflow
sprintf(S,"%lu %lu",(long)(Buf.f_blocks*(Buf.f_bsize/1024)),
// We use a kilobyte block size to advoid overflow
sprintf(S,"%lu %lu",(long)(Buf.f_blocks*(Buf.f_bsize/1024)),