summaryrefslogtreecommitdiffstats
path: root/tests/libcgrouptest.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2008-12-30 13:33:16 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2008-12-30 13:33:16 +0000
commit44e2ee38cc6f2c3ddd70da2c3df7eed032cd7d2a (patch)
tree5e7892a7eeab44b810bc79cda8c8f6bd1bd24042 /tests/libcgrouptest.h
parent0dc20562967dd750b5b3752308d45772af0d95db (diff)
downloadlibcg-44e2ee38cc6f2c3ddd70da2c3df7eed032cd7d2a.tar.gz
libcg-44e2ee38cc6f2c3ddd70da2c3df7eed032cd7d2a.tar.xz
libcg-44e2ee38cc6f2c3ddd70da2c3df7eed032cd7d2a.zip
libcgrouptest: Change the dynamic creation of messages to static 2d array
From: Sudhir Kumar <skumar@linux.vnet.ibm.com> This is addressing all the comments on the list and others too. Earlier we were creating the messgae array dynamicaly which is not required as the messages do not change dynamicaly. Let us have a static 2D array of messages. This patch does that. (This addresses the comment on the list ;)) Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@295 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r--tests/libcgrouptest.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h
index f9d51cc..eee6e62 100644
--- a/tests/libcgrouptest.h
+++ b/tests/libcgrouptest.h
@@ -78,8 +78,8 @@ enum info_message_t {
NOMESSAGE,
};
-/* Create a matrix of possible info messages */
-char **info;
+/* The set of verbose messages useful to the user */
+extern char info[NUM_MSGS][SIZE];
int64_t val_int64;
u_int64_t val_uint64;
@@ -135,11 +135,6 @@ static inline void message(int num, int pass, const char *api,
static inline void build_path(char *target, char *mountpoint,
const char *group, const char *file);
-/* Allocate memory and populate info messages */
-void set_info_msgs();
-/* Free the allocated memory for info messages */
-void free_info_msgs();
-
static inline pid_t cgrouptest_gettid()
{
return syscall(__NR_gettid);