[arch-commits] Commit in sysvinit/repos (10 files)
Date: Friday, October 12, 2012 @ 15:09:19 Author: thomas Revision: 168493 archrelease: copy trunk to testing-i686, testing-x86_64 Added: sysvinit/repos/testing-i686/ sysvinit/repos/testing-i686/0001-simplify-writelog.patch (from rev 168492, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/testing-i686/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 168492, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/testing-i686/PKGBUILD (from rev 168492, sysvinit/trunk/PKGBUILD) sysvinit/repos/testing-i686/sysvinit.install (from rev 168492, sysvinit/trunk/sysvinit.install) sysvinit/repos/testing-x86_64/ sysvinit/repos/testing-x86_64/0001-simplify-writelog.patch (from rev 168492, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/testing-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 168492, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/testing-x86_64/PKGBUILD (from rev 168492, sysvinit/trunk/PKGBUILD) sysvinit/repos/testing-x86_64/sysvinit.install (from rev 168492, sysvinit/trunk/sysvinit.install) --+ testing-i686/0001-simplify-writelog.patch| 126 ++ testing-i686/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ testing-i686/PKGBUILD| 61 testing-i686/sysvinit.install|3 testing-x86_64/0001-simplify-writelog.patch | 126 ++ testing-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ testing-x86_64/PKGBUILD | 61 testing-x86_64/sysvinit.install |3 8 files changed, 540 insertions(+) Copied: sysvinit/repos/testing-i686/0001-simplify-writelog.patch (from rev 168492, sysvinit/trunk/0001-simplify-writelog.patch) === --- testing-i686/0001-simplify-writelog.patch (rev 0) +++ testing-i686/0001-simplify-writelog.patch 2012-10-12 19:09:19 UTC (rev 168493) @@ -0,0 +1,126 @@ +From 5577552eb1344ddd661893564b1e628f8edcf13d Mon Sep 17 00:00:00 2001 +From: Florian Pritz +Date: Fri, 15 Jun 2012 16:41:52 +0200 +Subject: [PATCH 1/2] simplify writelog() + +All we do is prepend the date and remove \r. We don't handle color +codes, but the user can just cat the log file in a terminal and it will +interpret the codes correctly. + +Signed-off-by: Florian Pritz +--- + bootlogd.c | 76 +--- + 1 file changed, 21 insertions(+), 55 deletions(-) + +diff --git a/bootlogd.c b/bootlogd.c +index 570d382..e36e261 100644 +--- a/bootlogd.c b/bootlogd.c +@@ -68,11 +68,6 @@ int didnl = 1; + int createlogfile = 0; + int syncalot = 0; + +-struct line { +- char buf[256]; +- int pos; +-} line; +- + /* + *Console devices as listed on the kernel command line and + *the mapping to actual devices in /dev +@@ -351,63 +346,34 @@ int consolename(char *res, int rlen) + */ + void writelog(FILE *fp, unsigned char *ptr, int len) + { +- time_t t; +- char*s; +- chartmp[8]; +- int olen = len; +- int dosync = 0; +- int tlen; +- +- while (len > 0) { +- tmp[0] = 0; +- if (didnl) { ++ int dosync = 0; ++ int i; ++ static int first_run = 1; ++ ++ for (i = 0; i < len; i++) { ++ int ignore = 0; ++ ++ /* prepend date to every line */ ++ if (*(ptr-1) == '\n' || first_run) { ++ time_t t; ++ char *s; + time(&t); + s = ctime(&t); + fprintf(fp, "%.24s: ", s); +- didnl = 0; ++ dosync = 1; ++ first_run = 0; + } +- switch (*ptr) { +- case 27: /* ESC */ +- strcpy(tmp, "^["); +- break; +- case '\r': +- line.pos = 0; +- break; +- case 8: /* ^H */ +- if (line.pos > 0) line.pos--; +- break; +- case '\n': +- didnl = 1; +- dosync = 1; +- break; +- case '\t': +- line.pos += (line.pos / 8 + 1) * 8; +- if (line.pos >= (int)sizeof(line.buf)) +- line.pos = sizeof(line.buf)
[arch-commits] Commit in sysvinit/repos (10 files)
Date: Tuesday, September 4, 2012 @ 12:58:45 Author: tomegun Revision: 166138 archrelease: copy trunk to staging-i686, staging-x86_64 Added: sysvinit/repos/staging-i686/ sysvinit/repos/staging-i686/0001-simplify-writelog.patch (from rev 166137, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/staging-i686/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 166137, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/staging-i686/PKGBUILD (from rev 166137, sysvinit/trunk/PKGBUILD) sysvinit/repos/staging-i686/sysvinit.install (from rev 166137, sysvinit/trunk/sysvinit.install) sysvinit/repos/staging-x86_64/ sysvinit/repos/staging-x86_64/0001-simplify-writelog.patch (from rev 166137, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/staging-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 166137, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/staging-x86_64/PKGBUILD (from rev 166137, sysvinit/trunk/PKGBUILD) sysvinit/repos/staging-x86_64/sysvinit.install (from rev 166137, sysvinit/trunk/sysvinit.install) --+ staging-i686/0001-simplify-writelog.patch| 126 ++ staging-i686/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ staging-i686/PKGBUILD| 62 staging-i686/sysvinit.install|3 staging-x86_64/0001-simplify-writelog.patch | 126 ++ staging-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ staging-x86_64/PKGBUILD | 62 staging-x86_64/sysvinit.install |3 8 files changed, 542 insertions(+) Copied: sysvinit/repos/staging-i686/0001-simplify-writelog.patch (from rev 166137, sysvinit/trunk/0001-simplify-writelog.patch) === --- staging-i686/0001-simplify-writelog.patch (rev 0) +++ staging-i686/0001-simplify-writelog.patch 2012-09-04 16:58:45 UTC (rev 166138) @@ -0,0 +1,126 @@ +From 5577552eb1344ddd661893564b1e628f8edcf13d Mon Sep 17 00:00:00 2001 +From: Florian Pritz +Date: Fri, 15 Jun 2012 16:41:52 +0200 +Subject: [PATCH 1/2] simplify writelog() + +All we do is prepend the date and remove \r. We don't handle color +codes, but the user can just cat the log file in a terminal and it will +interpret the codes correctly. + +Signed-off-by: Florian Pritz +--- + bootlogd.c | 76 +--- + 1 file changed, 21 insertions(+), 55 deletions(-) + +diff --git a/bootlogd.c b/bootlogd.c +index 570d382..e36e261 100644 +--- a/bootlogd.c b/bootlogd.c +@@ -68,11 +68,6 @@ int didnl = 1; + int createlogfile = 0; + int syncalot = 0; + +-struct line { +- char buf[256]; +- int pos; +-} line; +- + /* + *Console devices as listed on the kernel command line and + *the mapping to actual devices in /dev +@@ -351,63 +346,34 @@ int consolename(char *res, int rlen) + */ + void writelog(FILE *fp, unsigned char *ptr, int len) + { +- time_t t; +- char*s; +- chartmp[8]; +- int olen = len; +- int dosync = 0; +- int tlen; +- +- while (len > 0) { +- tmp[0] = 0; +- if (didnl) { ++ int dosync = 0; ++ int i; ++ static int first_run = 1; ++ ++ for (i = 0; i < len; i++) { ++ int ignore = 0; ++ ++ /* prepend date to every line */ ++ if (*(ptr-1) == '\n' || first_run) { ++ time_t t; ++ char *s; + time(&t); + s = ctime(&t); + fprintf(fp, "%.24s: ", s); +- didnl = 0; ++ dosync = 1; ++ first_run = 0; + } +- switch (*ptr) { +- case 27: /* ESC */ +- strcpy(tmp, "^["); +- break; +- case '\r': +- line.pos = 0; +- break; +- case 8: /* ^H */ +- if (line.pos > 0) line.pos--; +- break; +- case '\n': +- didnl = 1; +- dosync = 1; +- break; +- case '\t': +- line.pos += (line.pos / 8 + 1) * 8; +- if (line.pos >= (int)sizeof(line.buf)) +- line.pos = sizeof(line.bu
[arch-commits] Commit in sysvinit/repos (10 files)
Date: Thursday, August 30, 2012 @ 16:27:27 Author: tomegun Revision: 165813 archrelease: copy trunk to testing-i686, testing-x86_64 Added: sysvinit/repos/testing-i686/ sysvinit/repos/testing-i686/0001-simplify-writelog.patch (from rev 165812, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/testing-i686/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 165812, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/testing-i686/PKGBUILD (from rev 165812, sysvinit/trunk/PKGBUILD) sysvinit/repos/testing-i686/sysvinit.install (from rev 165812, sysvinit/trunk/sysvinit.install) sysvinit/repos/testing-x86_64/ sysvinit/repos/testing-x86_64/0001-simplify-writelog.patch (from rev 165812, sysvinit/trunk/0001-simplify-writelog.patch) sysvinit/repos/testing-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch (from rev 165812, sysvinit/trunk/0002-remove-ansi-escape-codes-from-log-file.patch) sysvinit/repos/testing-x86_64/PKGBUILD (from rev 165812, sysvinit/trunk/PKGBUILD) sysvinit/repos/testing-x86_64/sysvinit.install (from rev 165812, sysvinit/trunk/sysvinit.install) --+ testing-i686/0001-simplify-writelog.patch| 126 ++ testing-i686/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ testing-i686/PKGBUILD| 63 + testing-i686/sysvinit.install|3 testing-x86_64/0001-simplify-writelog.patch | 126 ++ testing-x86_64/0002-remove-ansi-escape-codes-from-log-file.patch | 80 ++ testing-x86_64/PKGBUILD | 63 + testing-x86_64/sysvinit.install |3 8 files changed, 544 insertions(+) Copied: sysvinit/repos/testing-i686/0001-simplify-writelog.patch (from rev 165812, sysvinit/trunk/0001-simplify-writelog.patch) === --- testing-i686/0001-simplify-writelog.patch (rev 0) +++ testing-i686/0001-simplify-writelog.patch 2012-08-30 20:27:27 UTC (rev 165813) @@ -0,0 +1,126 @@ +From 5577552eb1344ddd661893564b1e628f8edcf13d Mon Sep 17 00:00:00 2001 +From: Florian Pritz +Date: Fri, 15 Jun 2012 16:41:52 +0200 +Subject: [PATCH 1/2] simplify writelog() + +All we do is prepend the date and remove \r. We don't handle color +codes, but the user can just cat the log file in a terminal and it will +interpret the codes correctly. + +Signed-off-by: Florian Pritz +--- + bootlogd.c | 76 +--- + 1 file changed, 21 insertions(+), 55 deletions(-) + +diff --git a/bootlogd.c b/bootlogd.c +index 570d382..e36e261 100644 +--- a/bootlogd.c b/bootlogd.c +@@ -68,11 +68,6 @@ int didnl = 1; + int createlogfile = 0; + int syncalot = 0; + +-struct line { +- char buf[256]; +- int pos; +-} line; +- + /* + *Console devices as listed on the kernel command line and + *the mapping to actual devices in /dev +@@ -351,63 +346,34 @@ int consolename(char *res, int rlen) + */ + void writelog(FILE *fp, unsigned char *ptr, int len) + { +- time_t t; +- char*s; +- chartmp[8]; +- int olen = len; +- int dosync = 0; +- int tlen; +- +- while (len > 0) { +- tmp[0] = 0; +- if (didnl) { ++ int dosync = 0; ++ int i; ++ static int first_run = 1; ++ ++ for (i = 0; i < len; i++) { ++ int ignore = 0; ++ ++ /* prepend date to every line */ ++ if (*(ptr-1) == '\n' || first_run) { ++ time_t t; ++ char *s; + time(&t); + s = ctime(&t); + fprintf(fp, "%.24s: ", s); +- didnl = 0; ++ dosync = 1; ++ first_run = 0; + } +- switch (*ptr) { +- case 27: /* ESC */ +- strcpy(tmp, "^["); +- break; +- case '\r': +- line.pos = 0; +- break; +- case 8: /* ^H */ +- if (line.pos > 0) line.pos--; +- break; +- case '\n': +- didnl = 1; +- dosync = 1; +- break; +- case '\t': +- line.pos += (line.pos / 8 + 1) * 8; +- if (line.pos >= (int)sizeof(line.buf)) +- line.pos = sizeof(line.b