[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 101731] nfs shares are not shown
From: "Kévin" ervin Ottens <ervin () ipsquad ! net>
Date: 2005-07-14 15:42:33
Message-ID: 20050714154233.32425.qmail () ktown ! kde ! org
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=101731
ervin ipsquad net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
------- Additional Comments From ervin ipsquad net 2005-07-14 17:42 -------
SVN commit 434569 by ervin:
Since HAL doesn't take care of network shares, introduce a "Network Shares
Only" mode in the fstab backend, and load it with HAL.
BUG:101731
M +13 -5 fstabbackend.cpp
M +2 -1 fstabbackend.h
M +1 -0 mediamanager.cpp
--- trunk/KDE/kdebase/kioslave/media/mediamanager/fstabbackend.cpp #434568:434569
@ -34,8 +34,8 @
-FstabBackend::FstabBackend(MediaList &list)
- : QObject(), BackendBase(list)
+FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly)
+ : QObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly)
{
KDirWatch::self()->addFile(MTAB);
KDirWatch::self()->addFile(FSTAB);
@ -86,7 +86,7 @
}
}
-bool inExclusionPattern(KMountPoint *mount)
+bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly)
{
if ( mount->mountType() == "swap"
|| mount->mountType() == "tmpfs"
@ -102,6 +102,14 @
|| mount->mountPoint() == "/dev/swap"
|| mount->mountPoint() == "/dev/pts"
|| mount->mountPoint().find("/proc") == 0
+
+ // We might want to display only network shares
+ // since HAL doesn't handle them
+ || ( networkSharesOnly
+ && mount->mountType().find( "smb" ) == -1
+ && mount->mountType().find( "cifs" ) == -1
+ && mount->mountType().find( "nfs" ) == -1
+ )
)
{
return true;
@ -127,7 +135,7 @
QString mp = (*it)->mountPoint();
QString fs = (*it)->mountType();
- if ( ::inExclusionPattern(*it) ) continue;
+ if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
QString id = generateId(dev, mp);
new_mtabIds+=id;
@ -205,7 +213,7 @
QString mp = (*it)->mountPoint();
QString fs = (*it)->mountType();
- if ( ::inExclusionPattern(*it) ) continue;
+ if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue;
QString id = generateId(dev, mp);
new_fstabIds+=id;
--- trunk/KDE/kdebase/kioslave/media/mediamanager/fstabbackend.h #434568:434569
@ -33,7 +33,7 @
Q_OBJECT
public:
- FstabBackend(MediaList &list);
+ FstabBackend(MediaList &list, bool networkSharesOnly = false);
virtual ~FstabBackend();
static void guess(const QString &devNode, const QString &mountPoint,
@ -51,6 +51,7 @
static QString generateName(const QString &devNode,
const QString &fsType);
+ bool m_networkSharesOnly;
QStringList m_mtabIds;
QStringList m_fstabIds;
#ifdef Q_OS_FREEBSD
--- trunk/KDE/kdebase/kioslave/media/mediamanager/mediamanager.cpp #434568:434569
@ -82,6 +82,7 @
if (hal_backend->InitHal())
{
m_backends.append( hal_backend );
+ m_backends.append( new FstabBackend(m_mediaList, true) );
// No need to load something else...
return;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic