ctdb_mutex_ceph_rados_helper: revert strtoull_err() usage

swen swen at linux.ibm.com
Sat Mar 2 06:26:56 UTC 2019


Hi David

Really sorry for that.

On Fri, 2019-03-01 at 09:19 -0800, Jeremy Allison via samba-technical
wrote:
> On Fri, Mar 01, 2019 at 04:50:24PM +0100, David Disseldorp via samba-
> technical wrote:
> > Compilation currently fails, as ctdb_mutex_ceph_rados_helper
> > doesn't
> > include or link against the samba-util library. Revert back to the
> > previous strtoull() behaviour, which works fine.
> > 
> > Review / push appreciated.
> 
> LGTM. RB+ and pushed. Sorry for the error. How should I
> configure (and what packages do I need on my test system)
> to ensure I don't make this mistake again ?
Me too, that would be good to know.

I really tried to go into every sub-project or 
seperatly compileable area trying to make sure above situations
are prevented.
In addition CI was run a good few times.

Sorry again.

Cheers Swen

> > From 03fda119b0f1aef7dd2a9e0e14171503fdc2ffc9 Mon Sep 17 00:00:00
> > 2001
> > From: David Disseldorp <ddiss at samba.org>
> > Date: Fri, 1 Mar 2019 16:40:50 +0100
> > Subject: [PATCH] ctdb_mutex_ceph_rados_helper: revert
> > strtoull_err() usage
> > 
> > Compilation currently fails, as ctdb_mutex_ceph_rados_helper
> > doesn't
> > include or link against the samba-util library. Revert back to the
> > previous strtoull() behaviour, which works fine.
> > 
> > Signed-off-by: David Disseldorp <ddiss at samba.org>
> > ---
> >  ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> > 
> > diff --git a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
> > b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
> > index a43855008c0..7ef76c26e02 100644
> > --- a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
> > +++ b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
> > @@ -301,14 +301,10 @@ int main(int argc, char *argv[])
> >  	cmr_state->pool_name = argv[3];
> >  	cmr_state->object = argv[4];
> >  	if (argc == 6) {
> > -		int error = 0;
> >  		/* optional lock duration provided */
> >  		char *endptr = NULL;
> > -		cmr_state->lock_duration_s = strtoull_err(argv[5],
> > -							  &endptr,
> > -							  0,
> > -							  &error);
> > -		if ((endptr == argv[5]) || (*endptr != '\0') || (error
> > != 0)) {
> > +		cmr_state->lock_duration_s = strtoull(argv[5], &endptr,
> > 0);
> > +		if ((endptr == argv[5]) || (*endptr != '\0')) {
> >  			fprintf(stdout, CTDB_MUTEX_STATUS_ERROR);
> >  			ret = -EINVAL;
> >  			goto err_ctx_cleanup;
> > -- 
> > 2.16.4
> > 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190302/c11a2f91/signature.sig>


More information about the samba-technical mailing list