VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h@ 3481

Last change on this file since 3481 was 2981, checked in by vboxsync, 17 years ago

InnoTek -> innotek: all the headers and comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/** @file
2 *
3 * vboxvfs -- VirtualBox Guest Additions for Linux
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * If you received this file as part of a commercial VirtualBox
18 * distribution, then only the terms of your commercial VirtualBox
19 * license agreement apply instead of the previous paragraph.
20 */
21
22#ifndef VFSMOD_H
23#define VFSMOD_H
24
25#define elog(fmt, ...) \
26printk (KERN_ERR "vboxvfs: %s: " fmt, __func__, __VA_ARGS__)
27#define elog2(s) printk (KERN_ERR "vboxvfs: %s: " s, __func__)
28#define elog3(...) printk (KERN_ERR "vboxvfs: " __VA_ARGS__)
29
30#ifdef ALIGN
31#undef ALIGN
32#endif
33
34#define CMC_API __attribute__ ((cdecl, regparm (0)))
35
36#define DBGC if (0)
37#define TRACE() DBGC printk (KERN_DEBUG "%s\n", __func__)
38
39/* Following casts are here to prevent assignment of void * to
40 pointers of arbitrary type */
41#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
42#define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->u.generic_sbp)
43#define SET_GLOB_INFO(sb, sf_g) (sb)->u.generic_sbp = sf_g
44#else
45#define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->s_fs_info)
46#define SET_GLOB_INFO(sb, sf_g) (sb)->s_fs_info = sf_g
47#endif
48
49#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) || defined(KERNEL_FC6)
50/* FC6 kernel 2.6.18, vanilla kernel 2.6.19+ */
51#define GET_INODE_INFO(i) ((struct sf_inode_info *) (i)->i_private)
52#define SET_INODE_INFO(i, sf_i) (i)->i_private = sf_i
53#else
54/* vanilla kernel up to 2.6.18 */
55#define GET_INODE_INFO(i) ((struct sf_inode_info *) (i)->u.generic_ip)
56#define SET_INODE_INFO(i, sf_i) (i)->u.generic_ip = sf_i
57#endif
58
59#endif /* vfsmod.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