summaryrefslogtreecommitdiff
path: root/library/storage.cpp
Side-by-side diff
Diffstat (limited to 'library/storage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/storage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/storage.cpp b/library/storage.cpp
index f4c1c02..12f9df9 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -179,69 +179,69 @@ void StorageInfo::update()
i.current()->update();
}
#endif
}
bool deviceTab( const char *device) {
QString name = device;
bool hasDevice=false;
struct mntent *me;
FILE *mntfp = setmntent( "/etc/mtab", "r" );
if ( mntfp ) {
while ( (me = getmntent( mntfp )) != 0 ) {
QString deviceName = me->mnt_fsname;
// qDebug(deviceName);
if( deviceName.left(name.length()) == name) {
hasDevice = true;
}
}
}
endmntent( mntfp );
return hasDevice;
}
/*!
- * @fn hasCf()
+ * @fn static bool StorageInfo::hasCf()
* @brief returns whether device has Cf mounted
*
*/
bool StorageInfo::hasCf()
{
return deviceTab("/dev/hd");
}
/*!
- * @fn hasSd()
+ * @fn static bool StorageInfo::hasSd()
* @brief returns whether device has SD mounted
*
*/
bool StorageInfo::hasSd()
{
return deviceTab("/dev/mmcd");
}
/*!
- * @fn hasMmc()
+ * @fn static bool StorageInfo::hasMmc()
* @brief reutrns whether device has mmc mounted
*
*/
bool StorageInfo::hasMmc()
{
bool hasMmc=false;
if( deviceTab("/dev/mmc/part"))
hasMmc=true;
if( deviceTab("/dev/mmcd"))
hasMmc=true;
return hasMmc;
}
//---------------------------------------------------------------------------
FileSystem::FileSystem( const QString &disk, const QString &path, const QString &name, bool rem, const QString &o )
: fsdisk( disk ), fspath( path ), humanname( name ), blkSize(512), totalBlks(0), availBlks(0), removable( rem ), opts( o )
{
update();
}
void FileSystem::update()
{