diff options
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r-- | include/linux/namei.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h index 99eb80306dc5..fc2e03579877 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -94,4 +94,9 @@ static inline char *nd_get_link(struct nameidata *nd) | |||
94 | return nd->saved_names[nd->depth]; | 94 | return nd->saved_names[nd->depth]; |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) | ||
98 | { | ||
99 | ((char *) name)[min(len, maxlen)] = '\0'; | ||
100 | } | ||
101 | |||
97 | #endif /* _LINUX_NAMEI_H */ | 102 | #endif /* _LINUX_NAMEI_H */ |