diff options
author | Balbir Singh <balbir@linux.vnet.ibm.com> | 2009-02-16 13:34:12 +0000 |
---|---|---|
committer | Balbir Singh <balbir@linux.vnet.ibm.com> | 2009-02-16 13:34:12 +0000 |
commit | dedcfa480ee21b9bb87964eb1e2665fe6a200b4c (patch) | |
tree | 61e4516a1f28071d8cb6604f8adb330eb598d3a0 /cgclassify.c | |
parent | b4ca5d9b4a38994aa71fbdb14fd5d65c81bf5216 (diff) | |
download | libcg-dedcfa480ee21b9bb87964eb1e2665fe6a200b4c.tar.gz libcg-dedcfa480ee21b9bb87964eb1e2665fe6a200b4c.tar.xz libcg-dedcfa480ee21b9bb87964eb1e2665fe6a200b4c.zip |
This patch store the last errno value to last_errno value and add
cgroup_add_last_errno procedure to show this number.
Use this procedure to show the cause of the error when ECGOTHER is returned.
[balbir@linux.vnet.ibm.com: fix last_errno in config.c]
Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@329 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'cgclassify.c')
-rw-r--r-- | cgclassify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cgclassify.c b/cgclassify.c index c41f529..4f7adb4 100644 --- a/cgclassify.c +++ b/cgclassify.c @@ -140,7 +140,8 @@ int main(int argc, char *argv[]) ret = cgroup_change_cgroup_uid_gid(euid, egid, pid); if (ret) { fprintf(stderr, "Error: change of cgroup failed for" - " pid %d\n", pid); + " pid %d: %s\n", + pid, cgroup_strerror(ret)); return ret; } } |