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 99eb803..fc2e035 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -94,4 +94,9 @@ static inline char *nd_get_link(struct nameidata *nd) return nd->saved_names[nd->depth]; } +static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) +{ + ((char *) name)[min(len, maxlen)] = '\0'; +} + #endif /* _LINUX_NAMEI_H */ |