VirtualBox

Ignore:
Timestamp:
Jan 9, 2019 4:29:03 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.c

    r76733 r76744  
    279279         * correct limit but MAX_LFS_FILESIZE (8TB-1 on 32-bit boxes) takes the
    280280         * page cache into account and is the suggested limit. */
    281 #if defined MAX_LFS_FILESIZE
     281# if defined MAX_LFS_FILESIZE
    282282        sb->s_maxbytes = MAX_LFS_FILESIZE;
    283 #else
     283# else
    284284        sb->s_maxbytes = 0x7fffffffffffffffULL;
    285 #endif
     285# endif
    286286#endif
    287287        sb->s_op = &sf_super_ops;
     
    384384        SET_INODE_INFO(inode, NULL);
    385385}
    386 #else
     386#else  /* LINUX_VERSION_CODE >= 2.6.36 */
    387387static void sf_evict_inode(struct inode *inode)
    388388{
     
    391391        TRACE();
    392392        truncate_inode_pages(&inode->i_data, 0);
    393 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
     393# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)
    394394        clear_inode(inode);
    395 #else
     395# else
    396396        end_writeback(inode);
    397 #endif
     397# endif
    398398
    399399        sf_i = GET_INODE_INFO(inode);
     
    406406        SET_INODE_INFO(inode, NULL);
    407407}
    408 #endif
     408#endif /* LINUX_VERSION_CODE >= 2.6.36 */
    409409
    410410/* this is called by vfs when it wants to populate [inode] with data.
     
    492492        /*unlock_new_inode(iroot); */
    493493        return 0;
    494 #else
     494#else  /* LINUX_VERSION_CODE < 2.4.23 */
    495495        return -ENOSYS;
    496 #endif
     496#endif /* LINUX_VERSION_CODE < 2.4.23 */
    497497}
    498498
     
    552552}
    553553
    554 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
     554# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
    555555static struct super_block *sf_get_sb(struct file_system_type *fs_type,
    556556                                     int flags, const char *dev_name,
     
    560560        return get_sb_nodev(fs_type, flags, data, sf_read_super_26);
    561561}
    562 #elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
     562# elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
    563563static int sf_get_sb(struct file_system_type *fs_type, int flags,
    564564                     const char *dev_name, void *data, struct vfsmount *mnt)
     
    567567        return get_sb_nodev(fs_type, flags, data, sf_read_super_26, mnt);
    568568}
    569 #else
     569# else /* LINUX_VERSION_CODE >= 2.6.39 */
    570570static struct dentry *sf_mount(struct file_system_type *fs_type, int flags,
    571571                               const char *dev_name, void *data)
     
    574574        return mount_nodev(fs_type, flags, data, sf_read_super_26);
    575575}
    576 #endif
     576# endif /* LINUX_VERSION_CODE >= 2.6.39 */
    577577
    578578static struct file_system_type vboxsf_fs_type = {
    579579        .owner = THIS_MODULE,
    580580        .name = "vboxsf",
    581 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
     581# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
    582582        .get_sb = sf_get_sb,
    583 #else
     583# else
    584584        .mount = sf_mount,
    585 #endif
     585# endif
    586586        .kill_sb = kill_anon_super
    587587};
    588 #endif
     588
     589#endif /* LINUX_VERSION_CODE >= 2.6.0 */
    589590
    590591#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
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