On 06/07/2011 03:56 PM, Michal Hocko wrote: > Currently we cannot specify permissions for subsystems files and > directories in the configuration file while we can do that by cgcreate > tool. > The tool, however, changes permissions blindly without considering > which of them make sense for particular files. One example is > cgroup.event_control which is supposed to be write only. > # cgcreate -a root:cgroup -f 775 -g cpu:foo > foo# ls -l > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cgroup.clone_children > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cgroup.event_control > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cgroup.procs > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cpu.rt_period_us > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cpu.rt_runtime_us > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 cpu.shares > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 notify_on_release > -rwxrwxr-x 1 root cgroup 0 May 19 11:17 tasks > > This patchset adds possibility to do the same thing as cgcreate in > configuration file and changes the way how we set file permissions.
The patchset looks pretty well, see individual comments in separate mails, but I still can see lot of checkpatch complaints: WARNING: externs should be avoided in .c files #47: FILE: src/config.c:75: +void init_cgroup_table(struct cgroup *cgroups, size_t count); That should go to libcgroup-internal.h WARNING: line over 80 characters #98: FILE: src/wrapper.c:28: + cgroup->task_fperm = cgroup->control_fperm = cgroup->control_dperm = NO_PERMS; Well.. I am inclined to break 80 char. limit, I've never understood what is it good for. What about Dhaval's opinion? ERROR: code indent should use tabs where possible #72: FILE: src/api.c:1479: +^I^I^I error = cg_chmod_recursive_controller(fts_path[0],$ ERROR: space required before the open parenthesis '(' #105: FILE: src/config.c:239: + if(!strcmp(perm_type, "fperm")) { There are lot of such errors. IMHO these should be fixed. Jan ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel