Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-12703 utils: reset rootpath in llapi_search_rootpath()
[fs/lustre-release.git]
/
lustre
/
utils
/
liblustreapi.c
diff --git
a/lustre/utils/liblustreapi.c
b/lustre/utils/liblustreapi.c
index
3417c77
..
848a72d
100644
(file)
--- a/
lustre/utils/liblustreapi.c
+++ b/
lustre/utils/liblustreapi.c
@@
-1454,6
+1454,9
@@
int llapi_search_fsname(const char *pathname, char *fsname)
int llapi_search_rootpath(char *pathname, const char *fsname)
{
+ /* pathname can be used as an argument by get_root_path(),
+ * clear it for safety */
+ pathname[0] = 0;
return get_root_path(WANT_PATH, (char *)fsname, NULL, pathname, -1);
}