1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
--- kioslave/media/kdedmodule/fstabbackend.cpp
+++ kioslave/media/kdedmodule/fstabbackend.cpp
@@ -47,6 +47,12 @@
handleMtabChange();
KDirWatch::self()->startScan();
+
+#ifdef Q_OS_FREEBSD
+ connect( &m_mtabTimer, SIGNAL( timeout() ),
+ this, SLOT( handleMtabChange() ) );
+ m_mtabTimer.start(250);
+#endif
}
FstabBackend::~FstabBackend()
@@ -86,7 +92,7 @@
|| mount->mountType() == "tmpfs"
|| mount->mountType() == "sysfs"
|| mount->mountType() == "usbfs"
- || mount->mountType() == "proc"
+ || mount->mountType().contains( "proc" )
|| mount->mountType() == "unknown"
|| mount->mountType() == "none"
|| mount->mountedFrom() == "none"
@@ -136,7 +142,7 @@
#if 0
else if ( !m_mtabIds.contains(id) )
{
- QString name = generateName(dev);
+ QString name = generateName(dev, fs);
Medium *m = new Medium(id, name);
@@ -205,7 +211,7 @@
if ( !m_fstabIds.contains(id) )
{
- QString name = generateName(dev);
+ QString name = generateName(dev, fs);
Medium *m = new Medium(id, name);
@@ -247,9 +253,18 @@
+m.replace("/", "");
}
-QString FstabBackend::generateName(const QString &devNode)
+QString FstabBackend::generateName(const QString &devNode, const QString &fsType)
{
- return KURL(devNode).fileName();
+ KURL url( devNode );
+
+ if ( url.isValid() )
+ {
+ return url.fileName();
+ }
+ else // surely something nfs or samba based
+ {
+ return fsType;
+ }
}
void FstabBackend::guess(const QString &devNode, const QString &mountPoint,
|