From patchwork Wed Aug 19 17:28:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 31662 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.samba.org (fn.samba.org [216.83.154.106]) by bilbo.ozlabs.org (Postfix) with ESMTP id 9E315B70BA for ; Thu, 20 Aug 2009 03:28:55 +1000 (EST) Received: from fn.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id A2A7FACFE6; Wed, 19 Aug 2009 11:22:08 -0600 (MDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on fn.samba.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.8 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED, RDNS_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.2.5 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mx2.redhat.com (unknown [66.187.237.31]) by lists.samba.org (Postfix) with ESMTP id 8581FACFE6; Wed, 19 Aug 2009 11:22:02 -0600 (MDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7JHSma2021050; Wed, 19 Aug 2009 13:28:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7JHSkxa001914; Wed, 19 Aug 2009 13:28:47 -0400 Received: from localhost.localdomain (vpn-8-24.rdu.redhat.com [10.11.8.24]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7JHSk8l027195; Wed, 19 Aug 2009 13:28:46 -0400 From: Jeff Layton To: linux-cifs-client@lists.samba.org, samba-technical@lists.samba.org Date: Wed, 19 Aug 2009 13:28:45 -0400 Message-Id: <1250702925-3583-1-git-send-email-jlayton@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Subject: [linux-cifs-client] [PATCH] cifs.upcall: switch to getopt_long X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-cifs-client-bounces@lists.samba.org Errors-To: linux-cifs-client-bounces@lists.samba.org ...to allow long option names. Signed-off-by: Jeff Layton --- client/cifs.upcall.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/client/cifs.upcall.c b/client/cifs.upcall.c index c89df9c..f06d563 100644 --- a/client/cifs.upcall.c +++ b/client/cifs.upcall.c @@ -27,6 +27,7 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k #include "includes.h" #include +#include #include "cifs_spnego.h" @@ -357,6 +358,11 @@ usage(void) fprintf(stderr, "Usage: %s [-v] key_serial\n", prog); } +const struct option long_options[] = { + { "version", 0, NULL, 'v' }, + { NULL, 0, NULL, 0 } +}; + int main(const int argc, char *const argv[]) { struct cifs_spnego_msg *keydata = NULL; @@ -374,7 +380,7 @@ int main(const int argc, char *const argv[]) openlog(prog, 0, LOG_DAEMON); - while ((c = getopt(argc, argv, "cv")) != -1) { + while ((c = getopt_long(argc, argv, "cv", long_options, NULL)) != -1) { switch (c) { case 'c': /* legacy option -- skip it */