[PATCH] Auto-generate param_functions.c at build time

Jeremy Allison jra at samba.org
Tue Jan 14 16:51:52 MST 2014


On Tue, Jan 14, 2014 at 11:12:47PM +0200, Nadezhda Ivanova wrote:
> Hi guys,
> I've been reading this discussion, and looking at some of the
> patches... In my humble opinion, when something - especially a big set of
> patches - is left to ripen, it risks being put off to the point of bring
> unuseable, or by the time we actually decide to use it it may be very
> difficult to merge. I agree that we needed to see the "big picture", but
> this is work that can fix problems that have been there for a while, and
> while we are all busy, it deserves our consideration, especially given that
> Garming will not be working on this forever. Just my 2 cents...

So I spoke to Andrew and at his request I'm going to take a look
at the rename patches (in case anyone else is interested
it's branch polished-param refsepecs 1c55b32d2115cd183dc365750502ca117815a242
to 7c24b36025ba63af88f97bb836dd62318c5db9e8) but to be
honest I really don't see an issue with merging these
renames.

They are simply tidyups that will make the auto-generation
of the parameter table eventually easier, and removing
the rather horrid CaMelCaSe naming style :-).

They only touch 2 files, lib/param/param_functions.c and
lib/param/param_table.c so I don't think there's an
issue with back-porting patches either (very few back-ports
have to make changes here).

Remember it's not changing the use of the lp_XXX() functions
in the main code that's going on here, it's only changes
like the following:

diff --git a/lib/param/param_functions.c b/lib/param/param_functions.c
index 8409bf6..6665d75 100644 (file)
--- a/lib/param/param_functions.c
+++ b/lib/param/param_functions.c
@@ -400,7 +400,7 @@ FN_GLOBAL_STRING(panic_action, panic_action)
 FN_GLOBAL_STRING(passwd_chat, passwd_chat)
 FN_GLOBAL_STRING(passwd_program, passwd_program)
 FN_GLOBAL_STRING(perfcount_module, perfcount_module)
-FN_GLOBAL_STRING(remote_announce, szRemoteAnnounce)
+FN_GLOBAL_STRING(remote_announce, remote_announce)
 FN_GLOBAL_STRING(remote_browse_sync, szRemoteBrowseSync)
 FN_GLOBAL_STRING(renameuser_script, szRenameUserScript)
 FN_GLOBAL_STRING(rootdir, szRootdir)
diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index 331d42c..060a638 100644 (file)
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -3445,7 +3445,7 @@ static struct parm_struct parm_table[] = {
                .label          = "remote announce",
                .type           = P_STRING,
                .p_class        = P_GLOBAL,
-               .offset         = GLOBAL_VAR(szRemoteAnnounce),
+               .offset         = GLOBAL_VAR(remote_announce),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED,

which does seem perfectly fine to me.

Jeremy


More information about the samba-technical mailing list