From f89ea5c9f24a6e46881b227d76a3abdd1ba11e18 Mon Sep 17 00:00:00 2001 From: Duane Griffin Date: Fri, 19 Dec 2008 20:47:11 +0000 Subject: [PATCH] --- yaml --- r: 124987 b: refs/heads/master c: 035146851cfa2fe24c1d9dc7637bb009ad06b2f7 h: refs/heads/master i: 124985: dc685aeb5ca5eac83d137014b63bf90e5fcbda36 124983: 0c4be3a3163893c6623a7a3852f22f744082b8fd v: v3 --- [refs] | 2 +- trunk/include/linux/namei.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 49d59eeea270..e87e7bb2cc5f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a17d5232de7b53d34229de79ec22f4bb04adb7e4 +refs/heads/master: 035146851cfa2fe24c1d9dc7637bb009ad06b2f7 diff --git a/trunk/include/linux/namei.h b/trunk/include/linux/namei.h index 99eb80306dc5..fc2e03579877 100644 --- a/trunk/include/linux/namei.h +++ b/trunk/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 */