Changeset 76744 in vbox for trunk/src/VBox/Additions/linux/sharedfolders/lnkops.c
- Timestamp:
- Jan 9, 2019 4:29:03 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128061
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/lnkops.c
r76733 r76744 33 33 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) 34 34 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) 37 37 static const char *sf_follow_link(struct dentry *dentry, void **cookie) 38 # else38 # else 39 39 static void *sf_follow_link(struct dentry *dentry, struct nameidata *nd) 40 # endif40 # endif 41 41 { 42 42 struct inode *inode = dentry->d_inode; … … 57 57 } 58 58 } 59 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)59 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0) 60 60 return error ? ERR_PTR(error) : (*cookie = path); 61 # else61 # else 62 62 nd_set_link(nd, error ? ERR_PTR(error) : path); 63 63 return NULL; 64 # endif64 # endif 65 65 } 66 66 67 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)67 # if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0) 68 68 static void sf_put_link(struct dentry *dentry, struct nameidata *nd, 69 69 void *cookie) … … 73 73 free_page((unsigned long)page); 74 74 } 75 # endif75 # endif 76 76 77 # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)*/77 # else /* LINUX_VERSION_CODE >= 4.5.0 */ 78 78 static const char *sf_get_link(struct dentry *dentry, struct inode *inode, 79 79 struct delayed_call *done) … … 100 100 return path; 101 101 } 102 # endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)*/102 # endif /* LINUX_VERSION_CODE >= 4.5.0 */ 103 103 104 104 struct 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) 106 106 .readlink = generic_readlink, 107 # endif108 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)107 # endif 108 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0) 109 109 .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) 111 111 .follow_link = sf_follow_link, 112 112 .put_link = free_page_put_link, 113 # else113 # else 114 114 .follow_link = sf_follow_link, 115 115 .put_link = sf_put_link 116 # endif116 # endif 117 117 }; 118 118 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.