summaryrefslogtreecommitdiffstats
path: root/tdeioslave/nfs/tdeio_nfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeioslave/nfs/tdeio_nfs.cpp')
-rw-r--r--tdeioslave/nfs/tdeio_nfs.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tdeioslave/nfs/tdeio_nfs.cpp b/tdeioslave/nfs/tdeio_nfs.cpp
index e2908f815..b29c66681 100644
--- a/tdeioslave/nfs/tdeio_nfs.cpp
+++ b/tdeioslave/nfs/tdeio_nfs.cpp
@@ -49,7 +49,7 @@
#include <tqdir.h>
#include <kdebug.h>
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <tdelocale.h>
#include <tdeio/global.h>
@@ -109,7 +109,7 @@ int x_getdomainname(char *name, size_t len)
//#endif
-extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
+extern "C" { int TDE_EXPORT kdemain(int argc, char **argv); }
int kdemain( int argc, char **argv )
{
@@ -135,9 +135,9 @@ static bool isRoot(const TQString& path)
static bool isAbsoluteLink(const TQString& path)
{
//hmm, don't know
- if (path.isEmpty()) return TRUE;
- if (path[0]=='/') return TRUE;
- return FALSE;
+ if (path.isEmpty()) return true;
+ if (path[0]=='/') return true;
+ return false;
}
static void createVirtualDirEntry(UDSEntry & entry)
@@ -190,14 +190,14 @@ static TQString removeFirstPart(const TQString& path)
}
NFSFileHandle::NFSFileHandle()
-:m_isInvalid(FALSE)
+:m_isInvalid(false)
{
memset(m_handle,'\0',NFS_FHSIZE+1);
// m_detectTime=time(0);
}
NFSFileHandle::NFSFileHandle(const NFSFileHandle & handle)
-:m_isInvalid(FALSE)
+:m_isInvalid(false)
{
m_handle[NFS_FHSIZE]='\0';
memcpy(m_handle,handle.m_handle,NFS_FHSIZE);
@@ -220,11 +220,11 @@ NFSFileHandle& NFSFileHandle::operator= (const char* src)
{
if (src==0)
{
- m_isInvalid=TRUE;
+ m_isInvalid=true;
return *this;
};
memcpy(m_handle,src,NFS_FHSIZE);
- m_isInvalid=FALSE;
+ m_isInvalid=false;
// m_detectTime=time(0);
return *this;
}
@@ -455,7 +455,7 @@ void NFSProtocol::openConnection()
if (!checkForError(clnt_stat, 0, m_currentHost.latin1())) return;
fhstatus fhStatus;
- bool atLeastOnceSucceeded(FALSE);
+ bool atLeastOnceSucceeded(false);
for(; exportlist!=0;exportlist = exportlist->ex_next) {
kdDebug(7121) << "found export: " << exportlist->ex_dir << endl;
@@ -463,7 +463,7 @@ void NFSProtocol::openConnection()
clnt_stat = clnt_call(m_client, MOUNTPROC_MNT,(xdrproc_t) xdr_dirpath, (char*)(&(exportlist->ex_dir)),
(xdrproc_t) xdr_fhstatus,(char*) &fhStatus,total_timeout);
if (fhStatus.fhs_status==0) {
- atLeastOnceSucceeded=TRUE;
+ atLeastOnceSucceeded=true;
NFSFileHandle fh;
fh=fhStatus.fhstatus_u.fhs_fhandle;
TQString fname;
@@ -1018,7 +1018,7 @@ bool NFSProtocol::checkForError(int clientStat, int nfsStat, const TQString& tex
kdDebug(7121)<<"rpc error: "<<clientStat<<endl;
//does this mapping make sense ?
error(ERR_CONNECTION_BROKEN,i18n("An RPC error occurred."));
- return FALSE;
+ return false;
}
if (nfsStat!=NFS_OK)
{
@@ -1083,9 +1083,9 @@ bool NFSProtocol::checkForError(int clientStat, int nfsStat, const TQString& tex
error(ERR_UNKNOWN,text);
break;
}
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void NFSProtocol::del( const KURL& url, bool isfile)
@@ -1585,7 +1585,7 @@ void NFSProtocol::symlink( const TQString &target, const KURL &dest, bool )
bool NFSProtocol::isValidLink(const TQString& parentDir, const TQString& linkDest)
{
kdDebug(7121)<<"isValidLink: parent: "<<parentDir<<" link: "<<linkDest<<endl;
- if (linkDest.isEmpty()) return FALSE;
+ if (linkDest.isEmpty()) return false;
if (isAbsoluteLink(linkDest))
{
kdDebug(7121)<<"is an absolute link"<<endl;
@@ -1601,7 +1601,7 @@ bool NFSProtocol::isValidLink(const TQString& parentDir, const TQString& linkDes
absDest=TQDir::cleanDirPath(absDest);
kdDebug(7121)<<"simplified to "<<absDest<<endl;
if (absDest.find("../")==0)
- return FALSE;
+ return false;
kdDebug(7121)<<"is inside the nfs tree"<<endl;
absDest=parentDir+"/"+linkDest;
@@ -1610,6 +1610,6 @@ bool NFSProtocol::isValidLink(const TQString& parentDir, const TQString& linkDes
NFSFileHandle fh=getFileHandle(absDest);
return (!fh.isInvalid());
}
- return FALSE;
+ return false;
}