summaryrefslogtreecommitdiff
path: root/library/storage.cpp
authorzecke <zecke>2003-10-07 13:00:31 (UTC)
committer zecke <zecke>2003-10-07 13:00:31 (UTC)
commit62d81aa76146401087e3ec9dcebd298a7d030c4a (patch) (side-by-side diff)
treec84a25f10fef6ca178f66eb1eee92916c6860db9 /library/storage.cpp
parent6f807f937764d0b80d38cd5e29983ad4ec2ae3c8 (diff)
downloadopie-62d81aa76146401087e3ec9dcebd298a7d030c4a.zip
opie-62d81aa76146401087e3ec9dcebd298a7d030c4a.tar.gz
opie-62d81aa76146401087e3ec9dcebd298a7d030c4a.tar.bz2
Add the possible defines to the custom- device headers
-storage remove stupid check for custom.h. We gurantee it to be present ( even if it is empty ) -qpeapplication -introduce OPIE_NEW_MALLOC This will use malloc and free for new and delete -introduce OPIE_HIGH_RES_SMALL_PHY define this if you've a high resolution but physical smaller display FIXME: some one needs to introduce a C7xx Custom.h or define OPIE_HIGH_RES_SMALL_PHY somewhere in the custom-sharp.h
Diffstat (limited to 'library/storage.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/storage.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/library/storage.cpp b/library/storage.cpp
index 1ce43bc..dc5cc22 100644
--- a/library/storage.cpp
+++ b/library/storage.cpp
@@ -1,74 +1,72 @@
/**********************************************************************
** Copyright (C) Holger 'zecke' Freyther <freyther@kde.org>
** Copyright (C) Lorn Potter <llornkcor@handhelds.org>
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
** This file is part of Opie Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#include <qpe/storage.h>
-#if defined(QT_QWS_SL5XXX)
#include <qpe/custom.h>
-#endif
#include <qfile.h>
#include <qtimer.h>
#include <qcopchannel_qws.h>
#include <stdio.h>
#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
#include <sys/vfs.h>
#include <mntent.h>
#endif
#include <qstringlist.h>
#include <sys/vfs.h>
#include <mntent.h>
static bool isCF(const QString& m)
{
FILE* f = fopen("/var/run/stab", "r");
if (!f) f = fopen("/var/state/pcmcia/stab", "r");
if (!f) f = fopen("/var/lib/pcmcia/stab", "r");
if ( f ) {
char line[1024];
char devtype[80];
char devname[80];
while ( fgets( line, 1024, f ) ) {
// 0 ide ide-cs 0 hda 3 0
if ( sscanf(line,"%*d %s %*s %*s %s", devtype, devname )==2 )
{
if ( QString(devtype) == "ide" && m.find(devname)>0 ) {
fclose(f);
return TRUE;
}
}
}
fclose(f);
}
return FALSE;
}
/*! \class StorageInfo storage.h
\brief The StorageInfo class describes the disks mounted on the file system.
This class provides access to the mount information for the Linux
filesystem. Each mount point is represented by the FileSystem class.
To ensure this class has the most up to date size information, call