summaryrefslogtreecommitdiff
path: root/library/storage.cpp
Unidiff
Diffstat (limited to 'library/storage.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/storage.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/storage.cpp b/library/storage.cpp
index bd34a5f..a4c96be 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -1,37 +1,39 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org>
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 3** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 4**
4** This file is part of Qtopia Environment. 5** This file is part of Qtopia Environment.
5** 6**
6** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 10** packaging of this file.
10** 11**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 12** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 13** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 14**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 15** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 16**
16** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 18** not clear to you.
18** 19**
19**********************************************************************/ 20**********************************************************************/
20 21
21#include <qpe/storage.h> 22#include <qpe/storage.h>
22#ifdef QT_QWS_CUSTOM 23#ifdef QT_QWS_CUSTOM
23#include <qpe/custom.h> 24#include <qpe/custom.h>
24#endif 25#endif
25 26
27#include <qfile.h>
26#include <qtimer.h> 28#include <qtimer.h>
27#include <qcopchannel_qws.h> 29#include <qcopchannel_qws.h>
28 30
29#include <stdio.h> 31#include <stdio.h>
30 32
31#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 33#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
32#include <sys/vfs.h> 34#include <sys/vfs.h>
33#include <mntent.h> 35#include <mntent.h>
34#endif 36#endif
35 37
36#include <qstringlist.h> 38#include <qstringlist.h>
37 39
@@ -75,25 +77,26 @@ const FileSystem *StorageInfo::fileSystemOf( const QString &filename )
75 if ( filename.startsWith( (*i)->path() ) ) 77 if ( filename.startsWith( (*i)->path() ) )
76 return (*i); 78 return (*i);
77 } 79 }
78 return 0; 80 return 0;
79} 81}
80 82
81 83
82void StorageInfo::cardMessage( const QCString& msg, const QByteArray& ) 84void StorageInfo::cardMessage( const QCString& msg, const QByteArray& )
83{ 85{
84 if ( msg == "mtabChanged()" ) 86 if ( msg == "mtabChanged()" )
85 update(); 87 update();
86} 88}
87 89// cause of the lack of a d pointer we need
90// to store informations in a config file :(
88void StorageInfo::update() 91void StorageInfo::update()
89{ 92{
90 //qDebug("StorageInfo::updating"); 93 //qDebug("StorageInfo::updating");
91#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 94#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
92 struct mntent *me; 95 struct mntent *me;
93 FILE *mntfp = setmntent( "/etc/mtab", "r" ); 96 FILE *mntfp = setmntent( "/etc/mtab", "r" );
94 97
95 QStringList curdisks; 98 QStringList curdisks;
96 QStringList curopts; 99 QStringList curopts;
97 QStringList curfs; 100 QStringList curfs;
98 bool rebuild = FALSE; 101 bool rebuild = FALSE;
99 int n=0; 102 int n=0;