From 9734045d9d11330b7782fbcffccf74fc98cdcc5c Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Tue, 3 May 2011 15:57:01 -0300 Subject: [PATCH] lib: [procutils.c]: general purpose procfs parsing functions We include the following functions as a first approach: - proc_open_tasks(): allocate resources and setup basic data - proc_next_tid(): iterate over the thread group - proc_close_tasks(): free used resources [kzak@redhat.com: - free() on error in proc_open_tasks(), - always call free() in proc_close_tasks() - ignore non-digit dirs and return 1 on end-of-dir in proc_next_tid()] Signed-off-by: Davidlohr Bueso Signed-off-by: Karel Zak --- lib/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 2b6445987e..7d966ff995 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/config/include-Makefile.am AM_CPPFLAGS += -DTEST_PROGRAM noinst_PROGRAMS = test_blkdev test_ismounted test_wholedisk test_mangle \ - test_tt test_canonicalize test_at test_strutils + test_tt test_canonicalize test_at test_strutils test_procutils if LINUX if HAVE_CPU_SET_T noinst_PROGRAMS += test_cpuset @@ -16,6 +16,7 @@ test_wholedisk_SOURCES = wholedisk.c test_mangle_SOURCES = mangle.c test_at_SOURCES = at.c test_strutils_SOURCES = strutils.c +test_procutils_SOURCES = procutils.c if LINUX test_cpuset_SOURCES = cpuset.c endif -- 2.47.3