From patchwork Tue Jul 15 15:09:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 4554771 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B6A89F1D6 for ; Tue, 15 Jul 2014 15:10:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C61A320172 for ; Tue, 15 Jul 2014 15:10:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D970A2015E for ; Tue, 15 Jul 2014 15:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753944AbaGOPKa (ORCPT ); Tue, 15 Jul 2014 11:10:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60248 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753313AbaGOPJv (ORCPT ); Tue, 15 Jul 2014 11:09:51 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6FF9gcS017575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Jul 2014 11:09:42 -0400 Received: from smallhat.boston.devel.redhat.com (smallhat.boston.devel.redhat.com [10.19.60.65]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6FF9ahX009793; Tue, 15 Jul 2014 11:09:42 -0400 From: Steve Dickson To: Libtirpc-devel Mailing List Cc: Linux NFS Mailing list Subject: [PATCH 11/15] key_call: Convert local debug() calls to LIBTIRPC_DEBUG() calls Date: Tue, 15 Jul 2014 11:09:30 -0400 Message-Id: <1405436974-4161-12-git-send-email-steved@redhat.com> In-Reply-To: <1405436974-4161-1-git-send-email-steved@redhat.com> References: <1405436974-4161-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Steve Dickson --- src/key_call.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/key_call.c b/src/key_call.c index 906b2f6..8b9f388 100644 --- a/src/key_call.c +++ b/src/key_call.c @@ -59,16 +59,11 @@ #include #include +#include "dump.h" #define KEY_TIMEOUT 5 /* per-try timeout in seconds */ #define KEY_NRETRY 12 /* number of retries */ -#ifdef DEBUG -#define debug(msg) (void) fprintf(stderr, "%s\n", msg); -#else -#define debug(msg) -#endif /* DEBUG */ - /* * Hack to allow the keyserver to use AUTH_DES (for authenticated * NIS+ calls, for example). The only functions that get called @@ -96,7 +91,7 @@ key_setsecret(secretkey) return (-1); } if (status != KEY_SUCCESS) { - debug("set status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_setsecret: set status is nonzero")); return (-1); } return (0); @@ -144,7 +139,7 @@ key_encryptsession_pk(remotename, remotekey, deskey) return (-1); } if (res.status != KEY_SUCCESS) { - debug("encrypt status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_encryptsession_pk: encrypt status is nonzero")); return (-1); } *deskey = res.cryptkeyres_u.deskey; @@ -168,7 +163,7 @@ key_decryptsession_pk(remotename, remotekey, deskey) return (-1); } if (res.status != KEY_SUCCESS) { - debug("decrypt status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_decryptsession_pk: decrypt status is nonzero")); return (-1); } *deskey = res.cryptkeyres_u.deskey; @@ -190,7 +185,7 @@ key_encryptsession(remotename, deskey) return (-1); } if (res.status != KEY_SUCCESS) { - debug("encrypt status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_encryptsession: encrypt status is nonzero")); return (-1); } *deskey = res.cryptkeyres_u.deskey; @@ -212,7 +207,7 @@ key_decryptsession(remotename, deskey) return (-1); } if (res.status != KEY_SUCCESS) { - debug("decrypt status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_decryptsession: decrypt status is nonzero")); return (-1); } *deskey = res.cryptkeyres_u.deskey; @@ -243,7 +238,7 @@ struct key_netstarg *arg; } if (status != KEY_SUCCESS) { - debug("key_setnet status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_setnet: key_setnet status is nonzero")); return (-1); } return (1); @@ -262,7 +257,7 @@ key_get_conv(pkey, deskey) return (-1); } if (res.status != KEY_SUCCESS) { - debug("get_conv status is nonzero"); + LIBTIRPC_DEBUG(1, ("key_get_conv: get_conv status is nonzero")); return (-1); } *deskey = res.cryptkeyres_u.deskey;