diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2016-02-23 07:54:46 (GMT) |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-23 13:20:58 (GMT) |
commit | bb91d345b49f9ca8ccf3ed9cc3346decdd9c4c3f (patch) | |
tree | 3296a839b65f2d8a1cf31315d7a43cb7a075ae3c /tools/gpio | |
parent | 9d8cc89c316d9cc8ff269068ac8f904f13b5a70d (diff) | |
download | linux-bb91d345b49f9ca8ccf3ed9cc3346decdd9c4c3f.tar.xz |
tools: gpio: Small updates for output format
Use %2d for the GPIO line number. This should align the results
horziontally for most gpio chips.
The GPIO label uses quotes for real values. For GPIO names this is
currently missing. The patch adds the missing quote.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/gpio')
-rw-r--r-- | tools/gpio/lsgpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c index 5535ce8..6af118cc 100644 --- a/tools/gpio/lsgpio.c +++ b/tools/gpio/lsgpio.c @@ -111,9 +111,9 @@ int list_device(const char *device_name) perror("Failed to issue LINEINFO IOCTL\n"); goto exit_close_error; } - fprintf(stdout, "\tline %d:", linfo.line_offset); + fprintf(stdout, "\tline %2d:", linfo.line_offset); if (linfo.name[0]) - fprintf(stdout, " %s", linfo.name); + fprintf(stdout, " \"%s\"", linfo.name); else fprintf(stdout, " unnamed"); if (linfo.label[0]) |