Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2017 16:50:16 +0800
From:      by <by@meetlost.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Parse command line arguments with getopt_long()
Message-ID:  <89069FBA-CA66-4D61-ABC5-6EC12DBB6798@meetlost.com>
In-Reply-To: <F446534E-E00C-482E-8A4E-7FF60FE4E0FC@meetlost.com>
References:  <373D1051-950A-41B1-BB33-55540A1E393A@meetlost.com> <CANCZdfrPr2snga260oH4-4_qTFnd_3fzg9C6qn3UmELJrqNYzw@mail.gmail.com> <F446534E-E00C-482E-8A4E-7FF60FE4E0FC@meetlost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <by@meetlost.com> 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"=





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89069FBA-CA66-4D61-ABC5-6EC12DBB6798>