Kaydet (Commit) 32009128 authored tarafından François Tigeot's avatar François Tigeot

Remove unused VolumeDevice functions and related code

üst 9a7f53cd
......@@ -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(
......
......@@ -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
......
......@@ -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: */
......@@ -223,24 +223,6 @@ namespace /* private */
// volume handling functions
//#####################################################
//#####################################################
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 )
{
......
......@@ -26,8 +26,6 @@
osl_getProfileSections;
# 2) VolumeDevice class and all this sub C API:
osl_unmountVolumeDevice;
osl_automountVolumeDevice;
osl_releaseVolumeDeviceHandle;
osl_acquireVolumeDeviceHandle;
......
......@@ -443,8 +443,6 @@ UDK_3_0_0 {
osl_getSystemTimeFromLocalTime;
osl_getAbsoluteFileURL;
osl_unmountVolumeDevice;
osl_automountVolumeDevice;
osl_releaseVolumeDeviceHandle;
osl_getVolumeDeviceMountPath;
osl_acquireVolumeDeviceHandle;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment