diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-07-07 22:14:25 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2019-07-07 22:37:13 +0900 |
commit | c76553c4fb3ee8f839c17b4dc3c3beb3c4338eb3 (patch) | |
tree | 165203f9bcab23defadc9c1f2a56c99365b5887f /tdecore/tdehw/tdestoragedevice.cpp | |
parent | 32566accdab31f598381e7e68330055f4a7178f1 (diff) | |
download | tdelibs-c76553c4fb3ee8f839c17b4dc3c3beb3c4338eb3.tar.gz tdelibs-c76553c4fb3ee8f839c17b4dc3c3beb3c4338eb3.zip |
tdehw: TRUE/FALSE --> true/false renaming.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdecore/tdehw/tdestoragedevice.cpp')
-rw-r--r-- | tdecore/tdehw/tdestoragedevice.cpp | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/tdecore/tdehw/tdestoragedevice.cpp b/tdecore/tdehw/tdestoragedevice.cpp index 5489dfc1c..71f852e0b 100644 --- a/tdecore/tdehw/tdestoragedevice.cpp +++ b/tdecore/tdehw/tdestoragedevice.cpp @@ -342,15 +342,15 @@ bool ejectDriveUDisks(TDEStorageDevice* sdevice) { if (error.isValid()) { // Error! printf("[ERROR][tdehwlib] ejectDriveUDisks: %s\n", error.name().ascii()); fflush(stdout); - return FALSE; + return false; } else { - return TRUE; + return true; } } } #endif // WITH_UDISKS - return FALSE; + return false; } bool ejectDriveUDisks2(TDEStorageDevice* sdevice) { @@ -371,13 +371,13 @@ bool ejectDriveUDisks2(TDEStorageDevice* sdevice) { if (error.isValid()) { // Error! printf("[ERROR][tdehwlib] ejectDriveUDisks2: %s\n", error.name().ascii()); fflush(stdout); - return FALSE; + return false; } else { if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) { TQT_DBusObjectPath driveObjectPath = reply[0].toVariant().value.toObjectPath(); if (!driveObjectPath.isValid()) { - return FALSE; + return false; } error = TQT_DBusError(); @@ -389,12 +389,12 @@ bool ejectDriveUDisks2(TDEStorageDevice* sdevice) { if (error.isValid()) { // Error! printf("[ERROR][tdehwlib] ejectDriveUDisks2: %s\n", error.name().ascii()); fflush(stdout); - return FALSE; + return false; } if (reply.type() == TQT_DBusMessage::ReplyMessage && reply.count() == 1) { bool ejectable = reply[0].toVariant().value.toBool(); if (!ejectable) { - return FALSE; + return false; } // Eject the drive! @@ -406,10 +406,10 @@ bool ejectDriveUDisks2(TDEStorageDevice* sdevice) { if (error.isValid()) { // Error! printf("[ERROR][tdehwlib] ejectDriveUDisks2: %s\n", error.name().ascii()); fflush(stdout); - return FALSE; + return false; } else { - return TRUE; + return true; } } } @@ -417,7 +417,7 @@ bool ejectDriveUDisks2(TDEStorageDevice* sdevice) { } } #endif // WITH_UDISKS2 - return FALSE; + return false; } int mountDriveUDisks(TQString deviceNode, TQString fileSystemType, TQStringList mountOptions, TQString* errStr = NULL) { @@ -600,7 +600,7 @@ bool TDEStorageDevice::ejectDrive() { #ifdef WITH_UDISKS2 if (!(TDEGlobal::dirs()->findExe("udisksctl").isEmpty())) { if (ejectDriveUDisks2(this)) { - return TRUE; + return true; } else { printf("[tdehwlib] Failed to eject drive '%s' via udisks2, falling back to alternate mechanism\n", deviceNode().ascii()); @@ -612,7 +612,7 @@ bool TDEStorageDevice::ejectDrive() { #ifdef WITH_UDISKS if (!(TDEGlobal::dirs()->findExe("udisks").isEmpty())) { if (ejectDriveUDisks(this)) { - return TRUE; + return true; } else { printf("[tdehwlib] Failed to eject drive '%s' via udisks, falling back to alternate mechanism\n", deviceNode().ascii()); @@ -631,14 +631,14 @@ bool TDEStorageDevice::ejectDrive() { eject_output = ts.read(); int retcode = pclose(exepipe); if (retcode == 0) { - return TRUE; + return true; } } printf("[tdehwlib] Failed to eject drive '%s' via 'eject' command\n", deviceNode().ascii()); fflush(stdout); } - return FALSE; + return false; } bool TDEStorageDevice::ejectDriveMedia() { @@ -1411,7 +1411,7 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) { if (errRet) { *errRet = i18n("No supported unmounting methods were detected on your system"); } - return true; + return false; } FILE *exepipe = popen(command.local8Bit(), "r"); @@ -1424,7 +1424,6 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) { if (*retcode == 0) { // Update internal mount data TDEGlobal::hardwareDevices()->processModifiedMounts(); - return true; } else { @@ -1436,7 +1435,6 @@ bool TDEStorageDevice::unmountDevice(TQString* errRet, int* retcode) { // Update internal mount data TDEGlobal::hardwareDevices()->processModifiedMounts(); - return false; } @@ -1452,7 +1450,7 @@ TQString TDEStorageDevice::determineFileSystemType(TQString path) { // Walk the directory tree up to the root, checking for any change in st_dev // If a change is found, the previous value of path is the mount point itself while (path != "/") { - pos = path.findRev("/", -1, TRUE); + pos = path.findRev("/", -1, true); if (pos < 0) { break; } |