Patchwork lib: fwts_log: set non-TTY log with to 80 characters (LP: #1200592)

login
register
mail settings
Submitter Colin King
Date July 12, 2013, 11:20 a.m.
Message ID <1373628018-14750-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/258740/
State Accepted
Headers show

Comments

Colin King - July 12, 2013, 11:20 a.m.
From: Colin Ian King <colin.king@canonical.com>

The default non-TTY log output width is 100 characters, which is a
pain when piping fwts output through tools like less on a standard
80 char wide TTY.  Set the default to 80 characters.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_log.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Alex Hung - July 15, 2013, 6:15 a.m.
On 07/12/2013 07:20 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The default non-TTY log output width is 100 characters, which is a
> pain when piping fwts output through tools like less on a standard
> 80 char wide TTY.  Set the default to 80 characters.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_log.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
> index d8b7cc9..693b943 100644
> --- a/src/lib/src/fwts_log.c
> +++ b/src/lib/src/fwts_log.c
> @@ -16,8 +16,6 @@
>    * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>    *
>    */
> -#define LOG_LINE_WIDTH 100
> -
>   #include <stdlib.h>
>   #include <stdio.h>
>   #include <stdarg.h>
> @@ -31,6 +29,7 @@
>
>   #include "fwts.h"
>
> +#define LOG_LINE_WIDTH		(80)
>   #define LOG_UNKOWN_FIELD	"???"
>
>   static int log_line_width = 0;
>


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu - July 16, 2013, 8:51 a.m.
On 07/12/2013 07:20 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The default non-TTY log output width is 100 characters, which is a
> pain when piping fwts output through tools like less on a standard
> 80 char wide TTY.  Set the default to 80 characters.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_log.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
> index d8b7cc9..693b943 100644
> --- a/src/lib/src/fwts_log.c
> +++ b/src/lib/src/fwts_log.c
> @@ -16,8 +16,6 @@
>    * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>    *
>    */
> -#define LOG_LINE_WIDTH 100
> -
>   #include <stdlib.h>
>   #include <stdio.h>
>   #include <stdarg.h>
> @@ -31,6 +29,7 @@
>
>   #include "fwts.h"
>
> +#define LOG_LINE_WIDTH		(80)
>   #define LOG_UNKOWN_FIELD	"???"
>
>   static int log_line_width = 0;
>
Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_log.c b/src/lib/src/fwts_log.c
index d8b7cc9..693b943 100644
--- a/src/lib/src/fwts_log.c
+++ b/src/lib/src/fwts_log.c
@@ -16,8 +16,6 @@ 
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
-#define LOG_LINE_WIDTH 100
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdarg.h>
@@ -31,6 +29,7 @@ 
 
 #include "fwts.h"
 
+#define LOG_LINE_WIDTH		(80)
 #define LOG_UNKOWN_FIELD	"???"
 
 static int log_line_width = 0;