Messages in this thread | | | Date | Sun, 8 Jan 2006 18:19:26 +0100 (CET) | From | Tim Schmielau <> | Subject | Re: [patch 5/7] uninline capable() |
| |
On Fri, 6 Jan 2006, Michael Buesch wrote:
> On Friday 06 January 2006 11:42, you wrote: > > Index: linux-2.6.15/include/linux/sched.h > > =================================================================== > > --- linux-2.6.15.orig/include/linux/sched.h > > +++ linux-2.6.15/include/linux/sched.h > > @@ -1102,19 +1102,8 @@ static inline int sas_ss_flags(unsigned > > } > > > > > > -#ifdef CONFIG_SECURITY > > -/* code is in security.c */ > > +/* code is in security.c or kernel/sys.c if !SECURITY */ > > extern int capable(int cap);
Great! I really love this. capable() was a great offender in the sched.h includes cleanup.
> BTW, is there a special reason why this is declared in sched.h > instead of capability.h?
Header file detangling. capable() needs to dereference current.
Moving capable() to capability.h would mean that capability.h needs to include sched.h, which 1) is inefficient as capability.h is included in about 5885 files and sched.h drags in another 133 header files and 2) results in a circular dependency.
Tim - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |