VirtualBox

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

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

Biggest check-in ever. New source code headers for all (C) innotek files.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 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
18#ifndef VFSMOD_H
19#define VFSMOD_H
20
21#define elog(fmt, ...) \
22printk (KERN_ERR "vboxvfs: %s: " fmt, __func__, __VA_ARGS__)
23#define elog2(s) printk (KERN_ERR "vboxvfs: %s: " s, __func__)
24#define elog3(...) printk (KERN_ERR "vboxvfs: " __VA_ARGS__)
25
26#ifdef ALIGN
27#undef ALIGN
28#endif
29
30#define CMC_API __attribute__ ((cdecl, regparm (0)))
31
32#define DBGC if (0)
33#define TRACE() DBGC printk (KERN_DEBUG "%s\n", __func__)
34
35/* Following casts are here to prevent assignment of void * to
36 pointers of arbitrary type */
37#if LINUX_VERSION_CODE < KERNEL_VERSION (2, 6, 0)
38#define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->u.generic_sbp)
39#define SET_GLOB_INFO(sb, sf_g) (sb)->u.generic_sbp = sf_g
40#else
41#define GET_GLOB_INFO(sb) ((struct sf_glob_info *) (sb)->s_fs_info)
42#define SET_GLOB_INFO(sb, sf_g) (sb)->s_fs_info = sf_g
43#endif
44
45#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) || defined(KERNEL_FC6)
46/* FC6 kernel 2.6.18, vanilla kernel 2.6.19+ */
47#define GET_INODE_INFO(i) ((struct sf_inode_info *) (i)->i_private)
48#define SET_INODE_INFO(i, sf_i) (i)->i_private = sf_i
49#else
50/* vanilla kernel up to 2.6.18 */
51#define GET_INODE_INFO(i) ((struct sf_inode_info *) (i)->u.generic_ip)
52#define SET_INODE_INFO(i, sf_i) (i)->u.generic_ip = sf_i
53#endif
54
55#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