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>

index | next in thread | previous in thread | raw e-mail

Seems can not find efivar, which version of FreeBSD you use?

I am on 10.3 RELEASE

by

> 
> Ok, will do that.
> Thanks.
> 
> by
> 
>> 
>> Look at /usr/src/usr.sbin/efivar/efivar.c for an example. It's not restricted to integers.
>> 
>> Warner
>> 
>>> On Thu, Sep 7, 2017 at 12:49 AM, by <by@meetlost.com> wrote:
>>> Hi,
>>> 
>>> I am writing a program which need parse command line arguments like "--myoption somevalue", and what I found is getopt_long(). After read the man page, I realize that this function can parse arguments like "--myoption=somevalue", the problem is, the somevalue can be integer only.
>>> 
>>> Is there any function already there to parse command line arguments with string values?
>>> 
>>> If not, I think I need parse argv manually.
>>> 
>>> 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.org"
>> 
> _______________________________________________
> 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"



home | help

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