Removing the original params.c parser (was: Re: [PATCH] lib: Remove some unused code)
Volker Lendecke
Volker.Lendecke at SerNet.DE
Fri Aug 15 03:34:13 MDT 2014
On Fri, Aug 15, 2014 at 11:31:01AM +0200, Volker Lendecke wrote:
> On Fri, Aug 15, 2014 at 09:19:27PM +1200, Andrew Bartlett wrote:
> > On Fri, 2014-08-15 at 07:52 +0200, Volker Lendecke wrote:
> > > Hi!
> > >
> > > Review&push would be appreciated!
> >
> > I'm happy with this, as long as the commit message is changed to
> > something along the lines of:
> >
> > This commit removes the original params.c smb.conf parser from 1997 by
> > Chris Hertel, which has served us very well over the years. The removal
> > is in favour of using the new tini parser, which as been written under a
> > BSD licence to support pam_winbind, and is formatted to modern Samba
> > coding conventions. By using a single parser across the codebase the
> > pam_winbind code benefits from this library being tested in a broader
> > set of configurations.
> >
> > This will help others understand what is going on when they later read
> > the GIT history.
> >
> > Chris: I know this is particularly difficult for you, but even for code
> > that needs as little attention as this, it is important that it be
> > consistent style-wise with the rest of the codebase. This applies even
> > in this case, where it came before these conventions and so much else in
> > Samba.
>
> If this hurts feelings to much, I take back the push
> request. If I have to write apologies for every - I have in
> a diff in the future, this will really, really become
> difficult to code for.
Attached find the revert.
Please review & push.
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 8a8eee0cda962d57154bb27ae2cff078d5dec2b8 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 15 Aug 2014 09:32:19 +0000
Subject: [PATCH] Revert "Use tini in preference."
This reverts commit ed66a984bf57d2f8a5bab86cd3c73e2430e301ef.
Signed-off-by: Volker Lendecke <vl at samba.org>
---
lib/util/params.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/lib/util/params.c b/lib/util/params.c
index 82c6e89..3f1d535 100644
--- a/lib/util/params.c
+++ b/lib/util/params.c
@@ -80,7 +80,6 @@
#include "includes.h"
#include "system/locale.h"
-#include "tini.h"
/* -------------------------------------------------------------------------- **
* Constants...
@@ -522,8 +521,6 @@ static myFILE *OpenConfFile(TALLOC_CTX *mem_ctx, const char *FileName )
return( ret );
} /* OpenConfFile */
-#if 0
-
bool pm_process( const char *FileName,
bool (*sfunc)(const char *, void *),
bool (*pfunc)(const char *, const char *, void *),
@@ -582,29 +579,4 @@ bool pm_process( const char *FileName,
return( true ); /* Generic success. */
} /* pm_process */
-#else
-
/* -------------------------------------------------------------------------- */
-
-bool pm_process(const char *filename,
- bool (*sfunc)(const char *section, void *private_data),
- bool (*pfunc)(const char *name, const char *value,
- void *private_data),
- void *private_data)
-{
- FILE *f;
- bool ret;
-
- f = fopen(filename, "r");
- if (f == NULL) {
- return false;
- }
-
- ret = tini_parse(f, sfunc, pfunc, private_data);
-
- fclose(f);
-
- return ret;
-}
-
-#endif
--
1.7.9.5
More information about the samba-technical
mailing list