lkml.org 
[lkml]   [2009]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 0/4] cgroups: show correct file mode
From
On Mon, Mar 2, 2009 at 4:09 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> int mode;
> if (cft->mode)
> mode = cft->mode;
> else if (cft->write_xxx || .....)
> mode = 0644;
> else
> mode = 0444;

Almost:

int mode;
if (cft->mode) {
mode = cft->mode;
} else {
if (cft->write_xxx || ....)
mode |= 0600;
if (cft->read_xxx || ...)
mode |= 0444;
}
Paul


\
 
 \ /
  Last update: 2009-03-03 01:19    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site