00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <opie2/ostorageinfo.h>
00031
00032 using namespace Opie::Core;
00033
00034 OStorageInfo::OStorageInfo( QObject *parent )
00035 : StorageInfo( parent )
00036 {
00037 }
00038
00039 OStorageInfo::~OStorageInfo()
00040 {
00041 }
00042
00043 QString OStorageInfo::cfPath()const
00044 {
00045 QString r = "";
00046
00047 for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
00048 {
00049 if ( (*i)->disk().left( 8 ) == "/dev/hda" )
00050 {
00051 r = (*i)->path();
00052 break;
00053 }
00054 }
00055 return r;
00056 }
00057
00058 QString OStorageInfo::sdPath()const
00059 {
00060 QString r = "";
00061
00062 for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
00063 {
00064 if ( (*i)->disk().left( 9 ) == "/dev/mmcd" ||
00065 (*i)->disk().left( 14 ) == "/dev/mmc/part1" )
00066 {
00067 r = (*i)->path();
00068 break;
00069 }
00070 }
00071 return r;
00072 }
00073
00074 QString OStorageInfo::mmcPath()const
00075 {
00076 QString r = "";
00077
00078 for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i)
00079 {
00080 if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1"||
00081 (*i)->disk().left(11) == "/dev/mmcblk" )
00082 {
00083 r = (*i)->path();
00084 break;
00085 }
00086 }
00087 return r;
00088 }
00089