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
- new flag '--ssh <ssh_cmd>' for replay_single and recovery-small: still defaults...
[fs/lustre-release.git]
/
lustre
/
liblustre
/
tests
/
test_common.c
diff --git
a/lustre/liblustre/tests/test_common.c
b/lustre/liblustre/tests/test_common.c
index
a87f0fa
..
a216d07
100644
(file)
--- a/
lustre/liblustre/tests/test_common.c
+++ b/
lustre/liblustre/tests/test_common.c
@@
-313,3
+313,16
@@
void t_ls(int fd, char *buf, int size)
EXIT(-1);
}
}
+
+char *safe_strncpy(char *dst, char *src, int max_size)
+{
+ int src_size;
+ src_size=strlen(src);
+ if (src_size >= max_size) {
+ src_size=max_size-1;
+ }
+ memcpy(dst, src, src_size);
+ dst[src_size]=0;
+
+ return(dst);
+}