Hello,
I want to pass one or more command-line arguments to my Genode application. So instead of starting "mosquitto", I want to run "mosquitto -p 1888", for example. How do I do this? I've found run files that pass arguments to Noux applications (using a start-element inside the config-element), but this does not seem to work for my application. So how are command-line arguments passed to the application in general? Below is the part of the init configuration that I currently use to start the application.
<start name="mosquitto"> <resource name="RAM" quantum="100M"/> <config> <vfs> <dir name="dev"> <log/> <rtc/> </dir> <dir name="socket"> <lwip ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1"/> </dir> </vfs> <libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" socket="/socket" /> </config> </start>
Regards, Wouter
I assume you can do this using the <arg> tag provided by Genodes posix environment. An example would be the run script repos/ports/run/lighttpd.run:
<start name="lighttpd" caps="200"> <resource name="RAM" quantum="1G" /> <config> <arg value="lighttpd" /> <arg value="-f" /> <arg value="/etc/lighttpd/lighttpd.conf" /> <arg value="-D" /> ...
Cheers, Martin
El 3/12/18 a las 14:05, Wouter van Oijen escribió:
Hello,
I want to pass one or more command-line arguments to my Genode application. So instead of starting "mosquitto", I want to run "mosquitto -p 1888", for example. How do I do this? I've found run files that pass arguments to Noux applications (using a start-element inside the config-element), but this does not seem to work for my application. So how are command-line arguments passed to the application in general? Below is the part of the init configuration that I currently use to start the application.
<start name="mosquitto"> <resource name="RAM" quantum="100M"/> <config> <vfs> <dir name="dev"> <log/> <rtc/> </dir> <dir name="socket"> <lwip ip_addr="10.0.2.55" netmask="255.255.255.0" gateway="10.0.2.1"/> </dir> </vfs> <libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" socket="/socket" /> </config> </start>
Regards, Wouter
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Hi Martin,
I assume you can do this using the <arg> tag provided by Genodes posix environment. An example would be the run script repos/ports/run/lighttpd.run:
<start name="lighttpd" caps="200"> <resource name="RAM" quantum="1G" /> <config> <arg value="lighttpd" /> <arg value="-f" /> <arg value="/etc/lighttpd/lighttpd.conf" /> <arg value="-D" /> ...
You're right. And apparently the first argument must be the executable name itself (which was not the case in some other examples), that's why it didn't work for me. It works now. Thanks!
Kind regards, Wouter van Oijen