gpioinfo: increase the width of the line offset
authorBartosz Golaszewski <bartekgola@gmail.com>
Sat, 28 Jan 2017 16:00:46 +0000 (17:00 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Sat, 28 Jan 2017 16:00:46 +0000 (17:00 +0100)
Increase the width of the line offset to 3 - that way we can display
999 lines before the formatting will be shifted.

This should be generally enough, but we should still implement
a correct, generic solution for gpioinfo display.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
src/tools/gpioinfo.c

index d09f78f4d3369017fbbb8bbdbbc4545724968fca..e9a9de103ab04805d17f0c31866d16f1cecc4434 100644 (file)
@@ -113,7 +113,7 @@ static void list_lines(struct gpiod_chip *chip)
                of = false;
 
                printf("\tline ");
-               prinfo(&of, 2, "%u", offset);
+               prinfo(&of, 3, "%u", offset);
                printf(": ");
 
                name ? prinfo(&of, 12, "\"%s\"", name)