Make sure bootlogd fflush() every line, even if asked not to flush
to disk using fdatasync(). Patch from Scott Gifford via Debian.
This commit is contained in:
parent
8debc401f8
commit
5da772c28f
@ -24,6 +24,8 @@ sysvinit (2.88dsf) UNRELEASED; urgency=low
|
||||
Patch from Debian.
|
||||
* Make sure bootlogd findpty() returns an error value when it fails to
|
||||
find a usable pty. Patch from Rob Leslie via Debian.
|
||||
* Make sure bootlogd fflush() every line, even if asked not to flush
|
||||
to disk using fdatasync(). Patch from Scott Gifford via Debian.
|
||||
|
||||
-- Petter Reinholdtsen <pere@hungry.com> Sun, 12 Jul 2009 19:58:10 +0200
|
||||
|
||||
|
@ -375,7 +375,7 @@ void writelog(FILE *fp, unsigned char *ptr, int len)
|
||||
break;
|
||||
case '\n':
|
||||
didnl = 1;
|
||||
dosync = syncalot;
|
||||
dosync = 1;
|
||||
break;
|
||||
case '\t':
|
||||
line.pos += (line.pos / 8 + 1) * 8;
|
||||
@ -407,8 +407,10 @@ void writelog(FILE *fp, unsigned char *ptr, int len)
|
||||
|
||||
if (dosync) {
|
||||
fflush(fp);
|
||||
if (syncalot) {
|
||||
fdatasync(fileno(fp));
|
||||
}
|
||||
}
|
||||
|
||||
outptr += olen;
|
||||
if (outptr >= endptr)
|
||||
|
Loading…
Reference in New Issue
Block a user