vboxvfs_vfsops.c revision 078259d71808bb78956dc1aa9f0ab83ab7e86614
/* $Id$ */
/** @file
* Description.
*/
/*
* Copyright (C) 2008-2010 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.
*/
#include "vboxvfs.h"
static int vboxvfs_version = VBOXVFS_VERSION;
/* global connection to the host service. */
static VBSFCLIENT g_vboxSFClient;
static vfs_init_t vboxvfs_init;
static vfs_uninit_t vboxvfs_uninit;
static vfs_cmount_t vboxvfs_cmount;
static vfs_mount_t vboxvfs_mount;
static vfs_root_t vboxvfs_root;
static vfs_quotactl_t vboxvfs_quotactl;
static vfs_statfs_t vboxvfs_statfs;
static vfs_unmount_t vboxvfs_unmount;
static struct vfsops vboxvfs_vfsops = {
.vfs_init = vboxvfs_init,
.vfs_root = vboxvfs_root,
.vfs_sync = vfs_stdsync,
};
{
struct vboxvfs_mount_info args;
int rc = 0;
if (rc)
return rc;
return rc;
}
static const char *vboxvfs_opts[] = {
};
{
int rc;
char *pszShare;
struct sf_glob_info *pShFlGlobalInfo;
int cbShFlShareName;
return EOPNOTSUPP;
{
return EINVAL;
}
return EINVAL;
return EINVAL;
return EINVAL;
if (!pShFlGlobalInfo)
return ENOMEM;
if (!pShFlShareName)
return VERR_NO_MEMORY;
if (RT_FAILURE (rc))
{
return EPROTO;
}
/* @todo root vnode. */
return 0;
}
{
int rc;
int flags = 0;
if (RT_FAILURE(rc))
printf("Failed to unmap shared folder\n");
flags |= FORCECLOSE;
/* There is 1 extra root vnode reference (vnode_root). */
if (rc)
return rc;
return 0;
}
{
int rc = 0;
return rc;
}
{
return EOPNOTSUPP;
}
{
int rc;
/* Initialize the R0 guest library. */
if (RT_FAILURE(rc))
return ENXIO;
/* Connect to the host service. */
if (RT_FAILURE(rc))
{
vboxUninit();
return ENXIO;
}
if (RT_FAILURE (rc))
{
vboxUninit();
return EPROTO;
}
printf("Successfully loaded shared folder module\n");
return 0;
}
{
vboxUninit();
return 0;
}
{
return 0;
}