From owner-freebsd-hackers@freebsd.org Thu Sep 7 08:50:23 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7132DE12415 for ; Thu, 7 Sep 2017 08:50:23 +0000 (UTC) (envelope-from by@meetlost.com) Received: from meetlost.com (freebsd.meetlost.com [IPv6:2403:2500:8000:1::962]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.meetlost.com", Issuer "mail.meetlost.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FA4175402 for ; Thu, 7 Sep 2017 08:50:22 +0000 (UTC) (envelope-from by@meetlost.com) Received: from [192.168.59.242] ([61.141.64.170]) (authenticated bits=0) by meetlost.com (8.15.2/8.15.2) with ESMTPSA id v878nud7094568 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 7 Sep 2017 08:49:57 GMT (envelope-from by@meetlost.com) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: Parse command line arguments with getopt_long() From: by X-Mailer: iPhone Mail (14G60) In-Reply-To: Date: Thu, 7 Sep 2017 16:50:16 +0800 Cc: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <89069FBA-CA66-4D61-ABC5-6EC12DBB6798@meetlost.com> References: <373D1051-950A-41B1-BB33-55540A1E393A@meetlost.com> To: Warner Losh X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Sep 2017 08:50:23 -0000 Seems can not find efivar, which version of FreeBSD you use? I am on 10.3 RELEASE by >=20 > Ok, will do that. > Thanks. >=20 > by >=20 >>=20 >> Look at /usr/src/usr.sbin/efivar/efivar.c for an example. It's not restri= cted to integers. >>=20 >> Warner >>=20 >>> On Thu, Sep 7, 2017 at 12:49 AM, by wrote: >>> Hi, >>>=20 >>> I am writing a program which need parse command line arguments like "--m= yoption somevalue", and what I found is getopt_long(). After read the man pa= ge, I realize that this function can parse arguments like "--myoption=3Dsome= value", the problem is, the somevalue can be integer only. >>>=20 >>> Is there any function already there to parse command line arguments with= string values? >>>=20 >>> If not, I think I need parse argv manually. >>>=20 >>> by >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" >>=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"=