[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work
From: |
Schanzenbach, Martin |
Subject: |
Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected |
Date: |
Wed, 13 Mar 2019 19:11:33 +0100 |
Hi!
> On 13. Mar 2019, at 18:25, Hartmut Goebel <address@hidden> wrote:
>
> Hi Martin,
>
> Am 03.03.19 um 11:33 schrieb Schanzenbach, Martin:
>> The first thing you should do it use GNUNET_PROGRAM*.
> I followed this advice, adding options --verbose, -s/--silent and
> -d/--device. Here is the resulting help output, which look s good::
>
> src/util/gnunet-qr --help
> gnunet-qr
> Scan a QR code using a video device and import the uri read
> Arguments mandatory for long options are also mandatory for short options.
> --verbose be verbose
> -c, --config=FILENAME use configuration file FILENAME
> -d, --device=DEVICE use video-device DEVICE (default: /dev/video0
> -h, --help print this help
> -L, --log=LOGLEVEL configure logging to use LOGLEVEL
> -l, --logfile=FILENAME configure logging to write logs to FILENAME
> -s, --silent do not show preview windows
> -v, --version print the version number
> Report bugs to address@hidden
> GNUnet home page: http://www.gnu.org/s/gnunet/
> General help using GNU software: http://www.gnu.org/gethelp/
>
>
> But the resulting program does not work as expected:
>
> • gnunet-qr -c src/my/test_my.conf
> -> invalid option -- c
You forgot to call:
GNUNET_STRINGS_get_utf8_args (argc, argv,
&argc, &argv)
without it the parsing will not actually happen ;).
FYI some flags are reserved and handled by GNUnet.
This includes "verbose", "config" etc. You can see what is reserved when you
add no arguments and call --help.
See gnunet-ecc.c how it's done.
> Curiously gnunet-ecc accepts this option.
> • gnunet-qr --config ./src/my/test_my.conf
> fails with "`stat' failed on file `/opt/gnunet/share/gnunet/config.d'
> [...]error: Datei oder Verzeichnis nicht gefunden"
> Why does the program try to access this directory when I passed an
> config-file?
>
> "/opt/gnunet" is the prefix I configured, thus the directory name makes
> sense. gnunet-ecc has the same issue.
>
GNUnet always tries to load the system/user config file first. The config file
you pass is used to override the default settings from that.
So if you did not actually install gnunet or don't have GNUNET_PREFIX setup,
this might be the issue.
BR
> I just pushed the code to branch gnunet-qt-c-2 (force-pushing to the prior
> branch was denied)
>
> --
> Regards
> Hartmut Goebel
>
> | Hartmut Goebel |
> address@hidden
> |
> |
> www.crazy-compilers.com
> | compilers which you thought are impossible |
>
signature.asc
Description: Message signed with OpenPGP
- [GNUnet-developers] Please review: C implementation of gnunet-qr, Hartmut Goebel, 2019/03/03
- Re: [GNUnet-developers] Please review: C implementation of gnunet-qr, Schanzenbach, Martin, 2019/03/03
- Re: [GNUnet-developers] Please review: C implementation of gnunet-qr, Schanzenbach, Martin, 2019/03/03
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Hartmut Goebel, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected,
Schanzenbach, Martin <=
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Schanzenbach, Martin, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, ng0, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Schanzenbach, Martin, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, ng0, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Christian Grothoff, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, ng0, 2019/03/13
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Christian Grothoff, 2019/03/14
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Hartmut Goebel, 2019/03/14
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, IC Rainbow, 2019/03/14
- Re: [GNUnet-developers] GNUNET_PROGRAM* option evaluation does not work as expected, Christian Grothoff, 2019/03/15