From 802b42a0cfc390bb69222e5b6f83e705f03ab2e6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 2 Feb 2017 16:37:37 +0900 Subject: [PATCH] fiptool: stretch out printf strings for readability and grep'ability We should follow the Linux coding style, which is clearly stated in the docs/user-guide.mk: When making changes to the source for submission to the project, the source must be in compliance with the Linux style guide and Documentation/process/coding-style.rst of Linux Kernel says: The limit on the length of lines is 80 columns and this is a strongly preferred limit. [ snip ] However, never break user-visible strings such as printk messages, because that breaks the ability to grep for them. The strings for printf() are user-visible, and can exceed the 80 column limit. Signed-off-by: Masahiro Yamada --- tools/fiptool/fiptool.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c index 8cf7ecec5..1e4451f8c 100644 --- a/tools/fiptool/fiptool.c +++ b/tools/fiptool/fiptool.c @@ -822,10 +822,8 @@ static void create_usage(void) printf("\n"); printf("Options:\n"); printf(" --align \t\tEach image is aligned to (default: 1).\n"); - printf(" --blob uuid=...,file=...\tAdd an image with the given UUID " - "pointed to by file.\n"); - printf(" --plat-toc-flags \t16-bit platform specific flag field " - "occupying bits 32-47 in 64-bit ToC header.\n"); + printf(" --blob uuid=...,file=...\tAdd an image with the given UUID pointed to by file.\n"); + printf(" --plat-toc-flags \t16-bit platform specific flag field occupying bits 32-47 in 64-bit ToC header.\n"); printf("\n"); printf("Specific images are packed with the following options:\n"); for (; toc_entry->cmdline_name != NULL; toc_entry++) @@ -938,11 +936,9 @@ static void update_usage(void) printf("\n"); printf("Options:\n"); printf(" --align \t\tEach image is aligned to (default: 1).\n"); - printf(" --blob uuid=...,file=...\tAdd or update an image " - "with the given UUID pointed to by file.\n"); + printf(" --blob uuid=...,file=...\tAdd or update an image with the given UUID pointed to by file.\n"); printf(" --out FIP_FILENAME\t\tSet an alternative output FIP file.\n"); - printf(" --plat-toc-flags \t16-bit platform specific flag field " - "occupying bits 32-47 in 64-bit ToC header.\n"); + printf(" --plat-toc-flags \t16-bit platform specific flag field occupying bits 32-47 in 64-bit ToC header.\n"); printf("\n"); printf("Specific images are packed with the following options:\n"); for (; toc_entry->cmdline_name != NULL; toc_entry++) @@ -1076,10 +1072,8 @@ static void unpack_usage(void) printf("fiptool unpack [opts] FIP_FILENAME\n"); printf("\n"); printf("Options:\n"); - printf(" --blob uuid=...,file=...\tUnpack an image with the given UUID " - "to file.\n"); - printf(" --force\t\t\tIf the output file already exists, use --force to " - "overwrite it.\n"); + printf(" --blob uuid=...,file=...\tUnpack an image with the given UUID to file.\n"); + printf(" --force\t\t\tIf the output file already exists, use --force to overwrite it.\n"); printf(" --out path\t\t\tSet the output directory path.\n"); printf("\n"); printf("Specific images are unpacked with the following options:\n"); @@ -1207,8 +1201,7 @@ static void remove_usage(void) printf("Options:\n"); printf(" --align \tEach image is aligned to (default: 1).\n"); printf(" --blob uuid=...\tRemove an image with the given UUID.\n"); - printf(" --force\t\tIf the output FIP file already exists, use --force to " - "overwrite it.\n"); + printf(" --force\t\tIf the output FIP file already exists, use --force to overwrite it.\n"); printf(" --out FIP_FILENAME\tSet an alternative output FIP file.\n"); printf("\n"); printf("Specific images are removed with the following options:\n");