sal/inc/osl/file.h | 43 -------------------- sal/inc/osl/file.hxx | 28 ------------- sal/osl/unx/file_volume.cxx | 80 -------------------------------------- sal/osl/w32/file_dirvol.cxx | 18 -------- sal/qa/helper/gcov/deprecated.txt | 2 sal/util/sal.map | 2 6 files changed, 173 deletions(-)
New commits: commit 32009128e4c77cfd6506ab50a5345776de8144e6 Author: François Tigeot <ftig...@wolfpond.org> Date: Sun Feb 5 18:33:57 2012 +0100 Remove unused VolumeDevice functions and related code diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h index 3bcd877..2c2713b 100644 --- a/sal/inc/osl/file.h +++ b/sal/inc/osl/file.h @@ -467,47 +467,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getFileStatus( typedef void *oslVolumeDeviceHandle; - -/** Unmount a volume device. - - Unmount the volume specified by the given oslVolumeDeviceHandle. - - @param Handle [in] - An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation(). - - @return - osl_File_E_None on success<br> - - @todo - specify all error codes that may be returned - - @see osl_getVolumeInformation() -*/ - -SAL_DLLPUBLIC oslFileError SAL_CALL osl_unmountVolumeDevice( - oslVolumeDeviceHandle Handle ); - - -/** Automount a volume device. - - Automount the volume device specified by the given oslVolumeDeviceHandle. - - @param Handle [in] - An oslVolumeDeviceHandle received by a call to osl_getVolumeInformation(). - - @return - osl_File_E_None on success<br> - - @todo - specify all error codes that may be returned - - @see osl_getVolumeInformation() -*/ - -SAL_DLLPUBLIC oslFileError SAL_CALL osl_automountVolumeDevice( - oslVolumeDeviceHandle Handle ); - - /** Release a volume device handle. Releases the given oslVolumeDeviceHandle which was acquired by a call to @@ -575,8 +534,6 @@ SAL_DLLPUBLIC oslFileError SAL_CALL osl_acquireVolumeDeviceHandle( osl_File_E_EOVERFLOW value too large for defined data type<br> @see osl_getVolumeInformation() - @see osl_automountVolumeDevice() - @see osl_unmountVolumeDevice() */ SAL_DLLPUBLIC oslFileError SAL_CALL osl_getVolumeDeviceMountPath( diff --git a/sal/inc/osl/file.hxx b/sal/inc/osl/file.hxx index d63126b..8c97750 100644 --- a/sal/inc/osl/file.hxx +++ b/sal/inc/osl/file.hxx @@ -388,34 +388,6 @@ public: return *this; } - /** Automount a volume device. - - @return - E_None on success - - @todo - specify all error codes that may be returned - */ - - inline RC automount() - { - return (RC)osl_automountVolumeDevice( _aHandle ); - } - - /** Unmount a volume device. - - @return - E_None on success - - @todo - specify all error codes that may be returned - */ - - inline RC unmount() - { - return (RC)osl_unmountVolumeDevice( _aHandle ); - } - /** Get the full qualified URL where a device is mounted to. @return diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index ce9f832..42965a7 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -59,14 +59,12 @@ #include <sys/mnttab.h> #include <sys/statvfs.h> #define HAVE_STATFS_H -static const sal_Char* MOUNTTAB="/etc/mnttab"; #elif defined(LINUX) #include <mntent.h> #include <sys/vfs.h> #define HAVE_STATFS_H -static const sal_Char* MOUNTTAB="/etc/mtab"; #elif defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) @@ -75,16 +73,11 @@ static const sal_Char* MOUNTTAB="/etc/mtab"; #include <sys/mount.h> #define HAVE_STATFS_H -/* No mounting table on *BSD - * This information is stored only in the kernel. */ -/* static const sal_Char* MOUNTTAB="/etc/mtab"; */ - #elif defined(MACOSX) #include <sys/param.h> #include <sys/mount.h> #define HAVE_STATFS_H -// static const sal_Char* MOUNTTAB="/etc/mtab"; #endif /* HAVE_STATFS_H */ @@ -360,42 +353,6 @@ static oslFileError osl_psz_getVolumeInformation ( * *****************************************************************************/ - -/***************************************** - * osl_unmountVolumeDevice - ****************************************/ - -oslFileError osl_unmountVolumeDevice( oslVolumeDeviceHandle Handle ) -{ - oslFileError tErr = osl_File_E_NOSYS; - - /* Perhaps current working directory is set to mount point */ - - if ( tErr ) - { - sal_Char *pszHomeDir = getenv("HOME"); - - if ( pszHomeDir && strlen( pszHomeDir ) && 0 == chdir( pszHomeDir ) ) - { - /* try again */ - OSL_ENSURE( tErr, "osl_unmountVolumeDevice: CWD was set to volume mount point" ); - } - } - - return tErr; -} - -/***************************************** - * osl_automountVolumeDevice - ****************************************/ - -oslFileError osl_automountVolumeDevice( oslVolumeDeviceHandle Handle ) -{ - oslFileError tErr = osl_File_E_NOSYS; - - return tErr; -} - /***************************************** * osl_getVolumeDeviceMountPath ****************************************/ @@ -491,41 +448,4 @@ oslFileError osl_releaseVolumeDeviceHandle( oslVolumeDeviceHandle Handle ) return osl_File_E_None; } -#if !defined(MACOSX) && !defined(AIX) && !defined(IOS) && !defined(ANDROID) - -/***************************************** - * osl_newVolumeDeviceHandleImpl - ****************************************/ - -static oslVolumeDeviceHandleImpl* osl_newVolumeDeviceHandleImpl() -{ - oslVolumeDeviceHandleImpl* pHandle; - const size_t nSizeOfHandle = sizeof(oslVolumeDeviceHandleImpl); - - pHandle = (oslVolumeDeviceHandleImpl*) rtl_allocateMemory (nSizeOfHandle); - if (pHandle != NULL) - { - pHandle->ident[0] = 'O'; - pHandle->ident[1] = 'V'; - pHandle->ident[2] = 'D'; - pHandle->ident[3] = 'H'; - pHandle->pszMountPoint[0] = '\0'; - pHandle->pszFilePath[0] = '\0'; - pHandle->pszDevice[0] = '\0'; - pHandle->RefCount = 1; - } - return pHandle; -} - -/***************************************** - * osl_freeVolumeDeviceHandleImpl - ****************************************/ - -static void osl_freeVolumeDeviceHandleImpl (oslVolumeDeviceHandleImpl* pHandle) -{ - if (pHandle != NULL) - rtl_freeMemory (pHandle); -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx index 7694818..50ad927 100644 --- a/sal/osl/w32/file_dirvol.cxx +++ b/sal/osl/w32/file_dirvol.cxx @@ -224,24 +224,6 @@ namespace /* private */ //##################################################### //##################################################### -oslFileError SAL_CALL osl_unmountVolumeDevice( oslVolumeDeviceHandle Handle ) -{ - if ( Handle ) - return osl_File_E_None; - else - return osl_File_E_INVAL; -} - -//##################################################### -oslFileError SAL_CALL osl_automountVolumeDevice( oslVolumeDeviceHandle Handle ) -{ - if ( Handle ) - return osl_File_E_None; - else - return osl_File_E_INVAL; -} - -//##################################################### oslFileError SAL_CALL osl_acquireVolumeDeviceHandle( oslVolumeDeviceHandle Handle ) { if ( Handle ) diff --git a/sal/qa/helper/gcov/deprecated.txt b/sal/qa/helper/gcov/deprecated.txt index a46a94a..8ee8b9c 100644 --- a/sal/qa/helper/gcov/deprecated.txt +++ b/sal/qa/helper/gcov/deprecated.txt @@ -26,8 +26,6 @@ osl_getProfileSections; # 2) VolumeDevice class and all this sub C API: - osl_unmountVolumeDevice; - osl_automountVolumeDevice; osl_releaseVolumeDeviceHandle; osl_acquireVolumeDeviceHandle; diff --git a/sal/util/sal.map b/sal/util/sal.map index 472ea8f..338854d 100644 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -443,8 +443,6 @@ UDK_3_0_0 { osl_getSystemTimeFromLocalTime; osl_getAbsoluteFileURL; - osl_unmountVolumeDevice; - osl_automountVolumeDevice; osl_releaseVolumeDeviceHandle; osl_getVolumeDeviceMountPath; osl_acquireVolumeDeviceHandle;
_______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits