On 06/29/2012 01:59 PM, Dhaval Giani wrote: > On Fri, Jun 29, 2012 at 3:17 PM, Glauber Costa <glom...@parallels.com> wrote: >> On 06/29/2012 01:37 PM, Dhaval Giani wrote: >>> This API does two things, >>> 1. Reads a controller structure to see if a value exists. If it does, then >>> it returns it. >>> 2. If the value does not exist, then it reads the filesystem to get that >>> value, and then return it. >> >> I don't understand why it needs to be a new API. It seems to me this >> should be the default behavior of cgroup_get_value_string(). >> > > For the purpose of testing, I would keep it as a separate API. I am > still not fully sure that I want to merge it into that API, because of > some thoughts (some may not be valid, but..) > > 1. Conceptually, those APIs are for in-memory structures, not for > reading from the file system.
They are still for in memory. You are just trying once more before you fail, because the pair cgroup_get_cgroup() and cgroup_modify_cgroup() is totally broken, which forces users not to call cgroup_get_cgroup() where they should. > 2. Now, a bad user might entail doing a cgroup_get_cgroup every time. > However, doing a cgroup_get_cgroup once and then use that cgroup in > the get_value_string API. That would mean this API is not needed in > any case. ENOPARSE. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel