summaryrefslogtreecommitdiffstats
path: root/commands/devinfo.c
Commit message (Collapse)AuthorAgeFilesLines
* parameter: Give device parameters typesSascha Hauer2017-04-101-1/+2
| | | | | | | | This adds a variable type enum and adds this to the device parameters. This information gives the user a hint which values a parameter expects and also helps to organize the parameters better internally. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Convert users of PRINTF_CONVERSION_RESOURCE to %paSascha Hauer2016-01-151-3/+5
| | | | | | | | printf now supports printing resource_size_t directly, convert all users of the previously used PRINTF_CONVERSION_RESOURCE over to %pa. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devfs: Add symlink supportSascha Hauer2016-01-081-2/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* devinfo: fix return valueSascha Hauer2015-06-231-5/+2
| | | | | | | | | | | | | | | devinfo on a non existing device prints: no such device: blah devinfo: Operation not permitted The second message comes because devinfo returns -1 which is -EPERM. Just return -ENODEV which will print: devinfo: No such device Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Documentation: remove doxygen documentationSascha Hauer2014-06-261-28/+0
| | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-06-041-1/+2
|\ | | | | | | | | Conflicts: commands/devinfo.c
| * devinfo: add human readable size after memory rangeFranck Jullien2014-05-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not always easy to know what is the size of a parition. This patch adds the size of a memory range in human readable format. We now have for example: `---- cfi_flash0 `---- nor0 `---- 0x00000000-0x00ffffff ( 16 MiB): /dev/nor0 `---- 0x00000000-0x0001ffff ( 128 KiB): /dev/env0 `---- 0x00020000-0x0011ffff ( 1 MiB): /dev/fpga0 `---- 0x00120000-0x0019ffff ( 512 KiB): /dev/self0 `---- 0x001a0000-0x00d9ffff ( 12 MiB): /dev/linux `---- 0x00da0000-0x00ffffff ( 2.4 MiB): /dev/elf Signed-off-by: Franck Jullien <franck.jullien@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devinfo: reduce indentationHolger Schurig2014-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | This patch reduces the indentation of "devinfo", to reduce the amount of overly long lines. And while we're at it, also remove the fixed-size of the human-readable area. As entries didn't align anyway (because of indentation), this was just eating more space without giving much more readability. Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | devinfo: make the output of "devinfo DEVICE" nicerHolger Schurig2014-06-021-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * some output sections started with "foo: bar", some with "foo = bar". Unify this. * there was a fixed size to the "foo =" parameters, which wasn't fitting, this was especially visible at "devinfo global" * don't output "resources:", "driver:" and "bus:" lines if there are none resources, drivers or busses involved. * remove some empty lines * harmonize differentiation between headlines (e.g. "resources:") and values by indenting values slightly * uppercase some texts Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | drvlist: factor the driver list out of 'devinfo'Holger Schurig2014-06-021-7/+2
| | | | | | | | | | | | | | | | | | The command 'devinfo' was first spitting out all devices, and then also all drivers. This patch separates them into two commands, 'devinfo' as before, and also the new command 'drvinfo' Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: harmonize in-barebox documentationHolger Schurig2014-05-141-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does probably too much, but it's hard (and very cumbersome/time consuming) to break it out. What is does is this: * each command has one short description, e.g. "list MUX configuration" * made sure the short descriptions start lowercase * each command has one usage. That string contains just the options, e.g. "[-npn]". It's not part of the long help text. * that is, it doesn't say "[OPTIONS]" anymore, every usable option is listed by character in this (short) option string (the long description is in the long help text, as before) * help texts have been reworked, to make them - sometimes smaller - sometimes describe the options better - more often present themselves in a nicer format * all long help texts are now created with BUSYBOX_CMD_HELP_ macros, no more 'static const __maybe_unused char cmd_foobar_help[]' * made sure the long help texts starts uppercase * because cmdtp->name and cmdtp->opts together provide the new usage, all "Usage: foobar" texts have been removed from the long help texts * BUSYBOX_CMD_HELP_TEXT() provides the trailing newline by itself, this is nicer in the source code * BUSYBOX_CMD_HELP_OPT() provides the trailing newline by itself * made sure no line gets longer than 77 characters * delibertely renamed cmdtp->usage, so that we can get compile-time errors (e.g. in out-of-tree modules that use register_command() * the 'help' command can now always emit the usage, even without compiled long help texts * 'help -v' gives a list of commands with their short description, this is similar like the old "help" command before my patchset * 'help -a' gives out help of all commands Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | commands: group 'help' outputHolger Schurig2014-05-141-0/+1
|/ | | | | | | | | | | | | | | | | | | The old output of "help" was just producing a long list, that usually scrolled of the screen (even on a X11 terminal). This list is more compact, and also sorted by groups. The old output format (plus grouping) is now available with 'help -v'. Example: Information commands: ?, devinfo, help, iomem, meminfo, version Boot commands: boot, bootm, go, loadb, loads, loadx, loady, saves, uimage ... Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* move devinfo command to its own fileSascha Hauer2013-09-271-0/+158
Just like nearly all other commands are in individual files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>