Here's a WIP: index d92788a..9e639bb 100644 --- a/commands/magicvar.c +++ b/commands/magicvar.c @@ -5,12 +5,22 @@ static int do_magicvar(int argc, char *argv[]) { struct magicvar *m; + struct device_d *dev; + struct param_d *param; for (m = &__barebox_magicvar_start; m != &__barebox_magicvar_end; m++) printf("%-32s %s\n", m->name, m->description); + for_each_device(dev) { + if (!strcmp("global", dev_name(dev))) + continue; + list_for_each_entry(param, &dev->parameters, list) { + printf("%s.%s\n", dev_name(dev), param->name); + } + } + return 0; } However, the output lacks descriptions: barebox:/ magicvar ... global.login.timeout timeout to type the password global.model Product name of this hardware global.version The barebox version net.nameserver net.domainname cs0.baudrate cs0.active cs1.baudrate cs1.active cs2.baudrate cs2.active cs3.baudrate cs3.active cs4.baudrate cs4.active eth0.ipaddr eth0.serverip eth0.gateway eth0.netmask eth0.ethaddr mmc1.probe mmc3.probe _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox