diff options
author | François Tigeot <ftigeot@wolfpond.org> | 2012-02-05 18:33:57 +0100 |
---|---|---|
committer | François Tigeot <ftigeot@wolfpond.org> | 2012-02-05 21:42:34 +0100 |
commit | 32009128e4c77cfd6506ab50a5345776de8144e6 (patch) | |
tree | 7eddd1a24d0934c556107aeb61ed62911ab964d2 /sal | |
parent | 9a7f53cdcfb40820d7c7f29e2190fb1572611b91 (diff) |
Remove unused VolumeDevice functions and related code
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/osl/file.h | 43 | ||||
-rw-r--r-- | sal/inc/osl/file.hxx | 28 | ||||
-rw-r--r-- | sal/osl/unx/file_volume.cxx | 80 | ||||
-rw-r--r-- | sal/osl/w32/file_dirvol.cxx | 18 | ||||
-rw-r--r-- | sal/qa/helper/gcov/deprecated.txt | 2 | ||||
-rw-r--r-- | sal/util/sal.map | 2 |
6 files changed, 0 insertions, 173 deletions
diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h index 3bcd877e78a8..2c2713b6da5c 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 d63126bea285..8c977508763e 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 ce9f832f15c4..42965a7e4e80 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 76948182c873..50ad92727889 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 a46a94acca65..8ee8b9cd477f 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 472ea8f45614..338854dabf3b 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; |