fs-posix.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
* IPRT - File System, Linux.
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#define LOG_GROUP RTLOGGROUP_FS
#include <errno.h>
{
/*
* Validate input.
*/
/*
* Convert the path and query the information.
*/
char *pszNativeFsPath;
if (RT_SUCCESS(rc))
{
/** @todo I'm not quite sure if statvfs was properly specified by SuS, I have to check my own
* implementation and FreeBSD before this can eventually be promoted to posix. */
{
/*
* Calc the returned values.
*/
if (pcbTotal)
if (pcbFree)
if (pcbBlock)
/* no idea how to get the sector... */
if (pcbSector)
*pcbSector = 512;
}
else
}
LogFlow(("RTFsQuerySizes(%p:{%s}, %p:{%RTfoff}, %p:{%RTfoff}, %p:{%RX32}, %p:{%RX32}): returns %Rrc\n",
return rc;
}
{
/*
* Validate input.
*/
/*
* Conver the path and query the stats.
* We're simply return the device id.
*/
char *pszNativeFsPath;
if (RT_SUCCESS(rc))
{
{
if (pu32Serial)
}
else
}
LogFlow(("RTFsQuerySerial(%p:{%s}, %p:{%RX32}: returns %Rrc\n",
return rc;
}
{
/*
* Validate.
*/
/*
* Convert the path and query the information.
*/
char *pszNativeFsPath;
if (RT_SUCCESS(rc))
{
{
/*
*/
pProperties->fCaseSensitive = true;
pProperties->fCompressed = false;
pProperties->fFileCompression = false;
pProperties->fRemote = false;
pProperties->fSupportsUnicode = true;
}
else
}
LogFlow(("RTFsQueryProperties(%p:{%s}, %p:{.cbMaxComponent=%u, .fCaseSensitive=%RTbool}): returns %Rrc\n",
return VINF_SUCCESS;
}