devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] tools: gpio: Small updates for output format
@ 2016-02-23  7:54 Markus Pargmann
  2016-02-23  7:54 ` [PATCH 2/4] tools: gpio: Add necessary include paths Markus Pargmann
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Markus Pargmann @ 2016-02-23  7:54 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Alexandre Courbot, Johan Hovold, Michael Welling,
	Bamvor Jian Zhang, Grant Likely, devicetree, Markus Pargmann

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>
---
 tools/gpio/lsgpio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 5535ce81f8f7..6af118cc7efb 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])
-- 
2.7.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-03-15  8:41 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23  7:54 [PATCH 1/4] tools: gpio: Small updates for output format Markus Pargmann
2016-02-23  7:54 ` [PATCH 2/4] tools: gpio: Add necessary include paths Markus Pargmann
2016-02-23 13:26   ` Linus Walleij
2016-02-24  6:39     ` Markus Pargmann
2016-02-23  7:54 ` [PATCH 3/4] gpio: dt-bindings: Declare gpio-hog optional for GPIO subnodes Markus Pargmann
2016-02-23 13:37   ` Linus Walleij
2016-02-23 23:25   ` Rob Herring
2016-02-24  7:01     ` Markus Pargmann
2016-03-02 15:41       ` Rob Herring
2016-03-09  4:07         ` Linus Walleij
2016-03-09  3:53     ` Linus Walleij
2016-03-09  4:27       ` Rob Herring
2016-03-09  5:56         ` Linus Walleij
2016-02-23  7:54 ` [PATCH 4/4] gpio: Add parsing of DT GPIO line-names Markus Pargmann
2016-02-23 13:36   ` Linus Walleij
2016-02-24  7:03     ` Markus Pargmann
2016-03-15  8:41   ` Linus Walleij
2016-02-23 13:21 ` [PATCH 1/4] tools: gpio: Small updates for output format Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).