From patchwork Fri Apr 29 13:25:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Mayhew X-Patchwork-Id: 8982211 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9CA7F9F372 for ; Fri, 29 Apr 2016 13:26:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEB6A201DD for ; Fri, 29 Apr 2016 13:26:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CF028201CE for ; Fri, 29 Apr 2016 13:25:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753023AbcD2NZ6 (ORCPT ); Fri, 29 Apr 2016 09:25:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37176 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbcD2NZ6 (ORCPT ); Fri, 29 Apr 2016 09:25:58 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6F7E03D6 for ; Fri, 29 Apr 2016 13:25:57 +0000 (UTC) Received: from tonberry.usersys.redhat.com (dhcp145-110.rdu.redhat.com [10.13.145.110]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3TDPuK8024209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 29 Apr 2016 09:25:57 -0400 Received: from tonberry.usersys.redhat.com (localhost [127.0.0.1]) by tonberry.usersys.redhat.com (8.15.2/8.14.5) with ESMTP id u3TDPuRK026766; Fri, 29 Apr 2016 09:25:56 -0400 Received: (from smayhew@localhost) by tonberry.usersys.redhat.com (8.15.2/8.15.2/Submit) id u3TDPuIJ026765; Fri, 29 Apr 2016 09:25:56 -0400 From: Scott Mayhew To: steved@redhat.com Cc: linux-nfs@vger.kernel.org Subject: [nfs-utils PATCH] exportfs: add the debug option Date: Fri, 29 Apr 2016 09:25:56 -0400 Message-Id: <1461936356-26727-1-git-send-email-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.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 Since calling xlog(D_GENERAL) will cause exportfs to exit with a status of 1, there really should be a way to see those messages for debugging purposes. Signed-off-by: Scott Mayhew --- utils/exportfs/exportfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index a9151ff..a5eb156 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -108,11 +108,14 @@ main(int argc, char **argv) xlog_stderr(1); xlog_syslog(0); - while ((c = getopt(argc, argv, "afhio:ruvs")) != EOF) { + while ((c = getopt(argc, argv, "ad:fhio:ruvs")) != EOF) { switch(c) { case 'a': f_all = 1; break; + case 'd': + xlog_sconfig(optarg, 1); + break; case 'f': force_flush = 1; break;