From 3b9c8ce8dc1a25afb30104cd852856af4c3691a7 Mon Sep 17 00:00:00 2001 From: Dhaval Giani Date: Mon, 21 Jul 2008 12:48:00 +0000 Subject: [PATCH] libcgroup: fix return value in cg_set_conrol_value We don't want to return errno as those results. Setting it to return a libcgroup error value. Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@108 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- api.c | 2 +- libcgroup.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api.c b/api.c index a001616d..2d4490d9 100644 --- a/api.c +++ b/api.c @@ -382,7 +382,7 @@ static int cg_set_control_value(char *path, char *val) fclose(control_file); return ECGROUPNOTALLOWED; } - return errno; + return ECGROUPVALUENOTEXIST; } fprintf(control_file, "%s", val); diff --git a/libcgroup.h b/libcgroup.h index 08db73ba..d81ec39b 100644 --- a/libcgroup.h +++ b/libcgroup.h @@ -117,6 +117,7 @@ enum cgroup_errors { ECGCONTROLLERCREATEFAILED, ECGFAIL, ECGROUPNOTINITIALIZED, + ECGROUPVALUENOTEXIST, }; #define CG_MAX_MSG_SIZE 256 -- 2.47.2