author | alwin <alwin> | 2005-03-03 22:40:52 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-03 22:40:52 (UTC) |
commit | 6458e3f1f86ab0aadceb3675c38abfbf33f070eb (patch) (unidiff) | |
tree | 9da8d7692485690a827d5095e43c1219e42467e3 | |
parent | e007cb2e4e3627ece4a093bc976debd6366ed1fa (diff) | |
download | opie-6458e3f1f86ab0aadceb3675c38abfbf33f070eb.zip opie-6458e3f1f86ab0aadceb3675c38abfbf33f070eb.tar.gz opie-6458e3f1f86ab0aadceb3675c38abfbf33f070eb.tar.bz2 |
added 2.6 kernel devicenames
ToDo: let it check using OStorage
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 53497df..452339c 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp | |||
@@ -274,33 +274,33 @@ bool CardMonitor::getStatusPcmcia( int showPopUp ) { | |||
274 | 274 | ||
275 | bool CardMonitor::getStatusSd( int showPopUp ) { | 275 | bool CardMonitor::getStatusSd( int showPopUp ) { |
276 | 276 | ||
277 | bool cardWas = cardInSd; // remember last state | 277 | bool cardWas = cardInSd; // remember last state |
278 | cardInSd = FALSE; | 278 | cardInSd = FALSE; |
279 | 279 | ||
280 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) | 280 | #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) |
281 | 281 | ||
282 | struct mntent *me; | 282 | struct mntent *me; |
283 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); | 283 | FILE *mntfp = setmntent( "/etc/mtab", "r" ); |
284 | 284 | ||
285 | if ( mntfp ) { | 285 | if ( mntfp ) { |
286 | while ( ( me = getmntent( mntfp ) ) != 0 ) { | 286 | while ( ( me = getmntent( mntfp ) ) != 0 ) { |
287 | QString fs = QFile::decodeName( me->mnt_fsname ); | 287 | QString fs = QFile::decodeName( me->mnt_fsname ); |
288 | //odebug << fs << oendl; | 288 | //odebug << fs << oendl; |
289 | if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" | 289 | if ( fs.left( 14 ) == "/dev/mmc/part1" || fs.left( 7 ) == "/dev/sd" |
290 | || fs.left( 9 ) == "/dev/mmcd" ) { | 290 | || fs.left( 9 ) == "/dev/mmcd" || fs.left(11) == "/dev/mmcblk" ) { |
291 | cardInSd = TRUE; | 291 | cardInSd = TRUE; |
292 | cardSdName = fs; | 292 | cardSdName = fs; |
293 | show(); | 293 | show(); |
294 | } | 294 | } |
295 | // else { | 295 | // else { |
296 | // cardInSd = FALSE; | 296 | // cardInSd = FALSE; |
297 | // } | 297 | // } |
298 | } | 298 | } |
299 | endmntent( mntfp ); | 299 | endmntent( mntfp ); |
300 | } | 300 | } |
301 | 301 | ||
302 | if ( !showPopUp && cardWas != cardInSd ) { | 302 | if ( !showPopUp && cardWas != cardInSd ) { |
303 | QString text = QString::null; | 303 | QString text = QString::null; |
304 | QString what = QString::null; | 304 | QString what = QString::null; |
305 | if ( cardInSd ) { | 305 | if ( cardInSd ) { |
306 | text += tr("New card: SD/MMC"); | 306 | text += tr("New card: SD/MMC"); |