VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/sharedfolders/vbsfmount.h@ 71844

Last change on this file since 71844 was 70786, checked in by vboxsync, 7 years ago

linux/shared folders: use indent to switch Linux-only files to kernel style.
bugref:9109: Shared folders: update to match in-kernel code more closely

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/** @file
2 * vboxsf -- VirtualBox Guest Additions for Linux: mount(2) parameter structure.
3 */
4
5/*
6 * Copyright (C) 2006-2017 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef VBFS_MOUNT_H
18#define VBFS_MOUNT_H
19
20/* Linux constraints the size of data mount argument to PAGE_SIZE - 1. */
21#define MAX_HOST_NAME 256
22#define MAX_NLS_NAME 32
23
24#define VBSF_MOUNT_SIGNATURE_BYTE_0 '\377'
25#define VBSF_MOUNT_SIGNATURE_BYTE_1 '\376'
26#define VBSF_MOUNT_SIGNATURE_BYTE_2 '\375'
27
28struct vbsf_mount_info_new {
29 /*
30 * The old version of the mount_info struct started with a
31 * char name[MAX_HOST_NAME] field, where name cannot be '\0'.
32 * So the new version of the mount_info struct starts with a
33 * nullchar field which is always 0 so that we can detect and
34 * reject the old structure being passed.
35 */
36 char nullchar;
37 char signature[3]; /* signature */
38 int length; /* length of the whole structure */
39 char name[MAX_HOST_NAME]; /* share name */
40 char nls_name[MAX_NLS_NAME]; /* name of an I/O charset */
41 int uid; /* user ID for all entries, default 0=root */
42 int gid; /* group ID for all entries, default 0=root */
43 int ttl; /* time to live */
44 int dmode; /* mode for directories if != 0xffffffff */
45 int fmode; /* mode for regular files if != 0xffffffff */
46 int dmask; /* umask applied to directories */
47 int fmask; /* umask applied to regular files */
48};
49
50struct vbsf_mount_opts {
51 int uid;
52 int gid;
53 int ttl;
54 int dmode;
55 int fmode;
56 int dmask;
57 int fmask;
58 int ronly;
59 int sloppy;
60 int noexec;
61 int nodev;
62 int nosuid;
63 int remount;
64 char nls_name[MAX_NLS_NAME];
65 char *convertcp;
66};
67
68/** Completes the mount operation by adding the new mount point to mtab if required. */
69int vbsfmount_complete(const char *host_name, const char *mount_point,
70 unsigned long flags, struct vbsf_mount_opts *opts);
71
72#endif /* vbsfmount.h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette