VirtualBox

Changeset 76745 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jan 9, 2019 4:30:17 PM (6 years ago)
Author:
vboxsync
Message:

vboxsf/linux: Indent #ifdefs and comment the according to our guidelines, no need to make this harder to untangle than it already is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r76733 r76745  
    4040
    4141#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    42 #include <linux/backing-dev.h>
     42# include <linux/backing-dev.h>
    4343#endif
    4444
     
    114114extern int sf_inode_revalidate(struct dentry *dentry);
    115115#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    116 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     116# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
    117117extern int sf_getattr(const struct path *path, struct kstat *kstat,
    118118                      u32 request_mask, unsigned int query_flags);
    119 #else
     119# else
    120120extern int sf_getattr(struct vfsmount *mnt, struct dentry *dentry,
    121121                      struct kstat *kstat);
    122 #endif
     122# endif
    123123extern int sf_setattr(struct dentry *dentry, struct iattr *iattr);
    124124#endif
     
    139139
    140140#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    141 #define STRUCT_STATFS  struct statfs
     141# define STRUCT_STATFS  struct statfs
    142142#else
    143 #define STRUCT_STATFS  struct kstatfs
     143# define STRUCT_STATFS  struct kstatfs
    144144#endif
    145145int sf_get_volume_info(struct super_block *sb, STRUCT_STATFS * stat);
    146146
    147147#ifdef __cplusplus
    148 #define CMC_API __attribute__ ((cdecl, regparm (0)))
     148# define CMC_API __attribute__ ((cdecl, regparm (0)))
    149149#else
    150 #define CMC_API __attribute__ ((regparm (0)))
     150# define CMC_API __attribute__ ((regparm (0)))
    151151#endif
    152152
     
    156156   pointers of arbitrary type */
    157157#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
    158 #define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->u.generic_sbp)
    159 #define SET_GLOB_INFO(sb, sf_g) (sb)->u.generic_sbp = sf_g
     158# define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->u.generic_sbp)
     159# define SET_GLOB_INFO(sb, sf_g) (sb)->u.generic_sbp = sf_g
    160160#else
    161 #define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->s_fs_info)
    162 #define SET_GLOB_INFO(sb, sf_g) (sb)->s_fs_info = sf_g
     161# define GET_GLOB_INFO(sb)       ((struct sf_glob_info *) (sb)->s_fs_info)
     162# define SET_GLOB_INFO(sb, sf_g) (sb)->s_fs_info = sf_g
    163163#endif
    164164
    165165#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) || defined(KERNEL_FC6)
    166166/* FC6 kernel 2.6.18, vanilla kernel 2.6.19+ */
    167 #define GET_INODE_INFO(i)       ((struct sf_inode_info *) (i)->i_private)
    168 #define SET_INODE_INFO(i, sf_i) (i)->i_private = sf_i
     167# define GET_INODE_INFO(i)       ((struct sf_inode_info *) (i)->i_private)
     168# define SET_INODE_INFO(i, sf_i) (i)->i_private = sf_i
    169169#else
    170170/* vanilla kernel up to 2.6.18 */
    171 #define GET_INODE_INFO(i)       ((struct sf_inode_info *) (i)->u.generic_ip)
    172 #define SET_INODE_INFO(i, sf_i) (i)->u.generic_ip = sf_i
     171# define GET_INODE_INFO(i)       ((struct sf_inode_info *) (i)->u.generic_ip)
     172# define SET_INODE_INFO(i, sf_i) (i)->u.generic_ip = sf_i
    173173#endif
    174174
    175175#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
    176 #define GET_F_DENTRY(f)        (f->f_path.dentry)
     176# define GET_F_DENTRY(f)        (f->f_path.dentry)
    177177#else
    178 #define GET_F_DENTRY(f)        (f->f_dentry)
     178# define GET_F_DENTRY(f)        (f->f_dentry)
    179179#endif
    180180
Note: See TracChangeset for help on using the changeset viewer.

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