VirtualBox

Ignore:
Timestamp:
Jan 9, 2019 4:29:03 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128061
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/lnkops.c

    r76733 r76744  
    3333#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
    3434
    35 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
    36 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     35# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
     36#  if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
    3737static const char *sf_follow_link(struct dentry *dentry, void **cookie)
    38 #else
     38#  else
    3939static void *sf_follow_link(struct dentry *dentry, struct nameidata *nd)
    40 #endif
     40#  endif
    4141{
    4242        struct inode *inode = dentry->d_inode;
     
    5757                }
    5858        }
    59 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     59#  if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
    6060        return error ? ERR_PTR(error) : (*cookie = path);
    61 #else
     61#  else
    6262        nd_set_link(nd, error ? ERR_PTR(error) : path);
    6363        return NULL;
    64 #endif
     64#  endif
    6565}
    6666
    67 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
     67#  if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
    6868static void sf_put_link(struct dentry *dentry, struct nameidata *nd,
    6969                        void *cookie)
     
    7373                free_page((unsigned long)page);
    7474}
    75 #endif
     75#  endif
    7676
    77 #else                           /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) */
     77# else  /* LINUX_VERSION_CODE >= 4.5.0 */
    7878static const char *sf_get_link(struct dentry *dentry, struct inode *inode,
    7979                               struct delayed_call *done)
     
    100100        return path;
    101101}
    102 #endif                          /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) */
     102# endif /* LINUX_VERSION_CODE >= 4.5.0 */
    103103
    104104struct inode_operations sf_lnk_iops = {
    105 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
     105# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
    106106        .readlink = generic_readlink,
    107 #endif
    108 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
     107# endif
     108# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
    109109        .get_link = sf_get_link
    110 #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
     110# elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
    111111        .follow_link = sf_follow_link,
    112112        .put_link = free_page_put_link,
    113 #else
     113# else
    114114        .follow_link = sf_follow_link,
    115115        .put_link = sf_put_link
    116 #endif
     116# endif
    117117};
    118118
    119 #endif                          /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) */
     119#endif  /* LINUX_VERSION_CODE >= 2.6.0 */
Note: See TracChangeset for help on using the changeset viewer.

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