From 392b335786db9997a6a75c0ea7100cf3bea64b4f Mon Sep 17 00:00:00 2001 From: ericm Date: Sat, 1 Nov 2003 08:17:23 +0000 Subject: [PATCH] liblustre: - support hard link() - fix memory leak in getattr() --- lustre/liblustre/test_common.c | 11 +++++++++++ lustre/liblustre/test_common.h | 1 + 2 files changed, 12 insertions(+) diff --git a/lustre/liblustre/test_common.c b/lustre/liblustre/test_common.c index 09f7de2..72fe7e7 100644 --- a/lustre/liblustre/test_common.c +++ b/lustre/liblustre/test_common.c @@ -62,6 +62,17 @@ void t_create(const char *path) #endif } +void t_link(const char *src, const char *dst) +{ + int rc; + + rc = link(src, dst); + if (rc) { + printf("link(%s -> %s) error: %s\n", src, dst); + EXIT(1); + } +} + void t_unlink(const char *path) { int rc; diff --git a/lustre/liblustre/test_common.h b/lustre/liblustre/test_common.h index 3fa9fd4..534fedc 100644 --- a/lustre/liblustre/test_common.h +++ b/lustre/liblustre/test_common.h @@ -5,6 +5,7 @@ extern int exit_on_err; void t_touch(const char *path); void t_create(const char *path); +void t_link(const char *src, const char *dst); void t_unlink(const char *path); void t_mkdir(const char *path); void t_rmdir(const char *path); -- 1.8.3.1