ctdb_mutex_ceph_rados_helper: revert strtoull_err() usage
Jeremy Allison
jra at samba.org
Fri Mar 1 17:19:59 UTC 2019
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 ?
Thanks David.
Jeremy.
> 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
>
More information about the samba-technical
mailing list