summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:36:50 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-08-08 14:36:50 -0500
commit960cc8392da291eaf6c90d2101b721f6c20488f3 (patch)
tree63ecdf7a203cd721c0652bad2023a3e9f53f995c /tdeioslave/media/mediamanager/tdehardwarebackend.cpp
parent3a84ecae5ded7370a7dfee43f25dd21269d65a7c (diff)
downloadtdebase-960cc8392da291eaf6c90d2101b721f6c20488f3.tar.gz
tdebase-960cc8392da291eaf6c90d2101b721f6c20488f3.zip
Update tdehw-based media manager for new mount API
Allow active VT to be queried from tdm Only display media notification messages on active VT Hide logout action buttons if logout process unstalls
Diffstat (limited to 'tdeioslave/media/mediamanager/tdehardwarebackend.cpp')
-rw-r--r--tdeioslave/media/mediamanager/tdehardwarebackend.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
index 3171d8f3c..369f87c3a 100644
--- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
+++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp
@@ -969,39 +969,15 @@ TQString TDEBackend::mount(const Medium *medium)
return i18n("Internal error");
}
- TQString optionString;
TQString diskLabel;
TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id()));
- if (valids["ro"] == "true") {
- optionString.append(" -r");
- }
-
- if (valids["atime"] != "true") {
- optionString.append(" -A");
- }
-
- if (valids["utf8"] == "true") {
- optionString.append(" -c utf8");
- }
-
- if (valids["sync"] == "true") {
- optionString.append(" -s");
- }
TQString mount_point = valids["mountpoint"];
if (mount_point.startsWith("/media/")) {
diskLabel = mount_point.mid(7);
}
- if (valids.contains("filesystem")) {
- optionString.append(TQString(" -t %1").arg(valids["filesystem"]));
- }
-
- if (valids.contains("locale")) {
- optionString.append(TQString(" -c %1").arg(valids["locale"]));
- }
-
if (diskLabel == "") {
// Try to use a pretty mount point if possible
TQStringList pieces = TQStringList::split("/", sdevice->deviceNode(), FALSE);
@@ -1015,7 +991,7 @@ TQString TDEBackend::mount(const Medium *medium)
if (!medium->isEncrypted()) {
// normal volume
TQString mountMessages;
- TQString mountedPath = sdevice->mountDevice(diskLabel, optionString, &mountMessages);
+ TQString mountedPath = sdevice->mountDevice(diskLabel, valids, &mountMessages);
if (mountedPath.isNull()) {
qerror = i18n("<qt>Unable to mount this device.<p>Potential reasons include:<br>Improper device and/or user privilege level<br>Corrupt data on storage device");
if (!mountMessages.isNull()) {
@@ -1068,7 +1044,7 @@ TQString TDEBackend::mount(const Medium *medium)
// mount encrypted volume with password
int mountRetcode;
TQString mountMessages;
- TQString mountedPath = sdevice->mountEncryptedDevice(m_decryptionPassword, diskLabel, optionString, &mountMessages, &mountRetcode);
+ TQString mountedPath = sdevice->mountEncryptedDevice(m_decryptionPassword, diskLabel, valids, &mountMessages, &mountRetcode);
if (mountedPath.isNull()) {
if (mountRetcode == 0) {
// Mounting was successful