Patch to export init_stat_ex_from_stat so that it can be used in VFS modules rather than duplicating code

Richard Sharpe realrichardsharpe at gmail.com
Thu Jun 9 10:01:54 MDT 2011


On Thu, Jun 9, 2011 at 11:58 AM, Guenther Deschner <gd at samba.org> wrote:
> Hi RIchard,
>
> On 06/09/2011 01:24 AM, Richard Sharpe wrote:
>>
>> OK,
>>
>> Here is an updated version:
>>
>> Signed-off-by: Richard Sharpe<realrichardsharpe at gmail.com>
>>
>> From: Richard Sharpe<realrichardsharpe at gmail.com>
>> Date: Fri, 3 Jun 2011 08:27:13 -0700
>> Subject: [PATCH] Export init_stat_ex_from_stat for use in VFS modules.
>>
>> ---
>>  source3/include/includes.h |    1 +
>>  source3/include/proto.h    |   11 +++++++++++
>>  source3/lib/system.c       |   12 ++++++------
>>  3 files changed, 18 insertions(+), 6 deletions(-)
>>
>> diff --git a/source3/include/includes.h b/source3/include/includes.h
>> index e6b70c7..55a8e85 100644
>> --- a/source3/include/includes.h
>> +++ b/source3/include/includes.h
>> @@ -72,6 +72,7 @@
>>  #include "system/locale.h"
>>  #include "system/time.h"
>>  #include "system/wait.h"
>> +#include "system/filesys.h"
>
> ^^^ please, please don't do that.
>
> It took us a long time to trim down the list of global includes (and make
> includes.h more and more identical between s3 and s4) and you would just
> re-add a whole bunch of globally included header files just in order to have
> one additional prototype again globally available. This is how we did things
> in the past but we should not continue to do it this way.
>
> A better way of resolving this would be to split out the prototypes of the
> init_stat_ex_from_stat() call to a tiny separate header file for now, and
> include it only where really needed.
>
> Does that make sense ?

Well, it makes sense, but I am getting contradictory advice from
different team members :-)

There is bound to be more functions that are needed in VFS modules and
there may already be some that have been placed in proto.h ...

-- 
Regards,
Richard Sharpe


More information about the samba-technical mailing list