[Pkg-sysvinit-commits] r1431 - in sysvinit-upstream/trunk: doc man src
Petter Reinholdtsen
pere at alioth.debian.org
Sat Jul 11 06:42:27 UTC 2009
Author: pere
Date: 2009-07-11 06:42:26 +0000 (Sat, 11 Jul 2009)
New Revision: 1431
Modified:
sysvinit-upstream/trunk/doc/Changelog
sysvinit-upstream/trunk/man/bootlogd.8
sysvinit-upstream/trunk/src/bootlogd.c
Log:
Add bootlogd option -s to make it possible to control the use of fdatasync(). Patch from Thomas Hood.
Modified: sysvinit-upstream/trunk/doc/Changelog
===================================================================
--- sysvinit-upstream/trunk/doc/Changelog 2009-07-11 06:35:33 UTC (rev 1430)
+++ sysvinit-upstream/trunk/doc/Changelog 2009-07-11 06:42:26 UTC (rev 1431)
@@ -43,6 +43,8 @@
process name can be one character longer. Patch by Kir Kolyshkin.
* Make sure bootlogd exit with non-error exit code when forking of
the child successfully.
+ * Add bootlogd option -s to make it possible to control the use of
+ fdatasync(). Patch from Thomas Hood.
-- Petter Reinholdtsen <pere at debian.org> Fri, 30 Jul 2004 14:14:58 +0200
Modified: sysvinit-upstream/trunk/man/bootlogd.8
===================================================================
--- sysvinit-upstream/trunk/man/bootlogd.8 2009-07-11 06:35:33 UTC (rev 1430)
+++ sysvinit-upstream/trunk/man/bootlogd.8 2009-07-11 06:42:26 UTC (rev 1431)
@@ -5,6 +5,7 @@
.B /sbin/bootlogd
.RB [ \-d ]
.RB [ \-r ]
+.RB [ \-s ]
.RB [ \-v ]
.RB [ " -l logfile " ]
.RB [ " -p pidfile " ]
@@ -18,6 +19,12 @@
.IP \fB\-r\fP
If there is an existing logfile called \fIlogfile\fP rename it to
\fIlogfile~\fP unless \fIlogfile~\fP already exists.
+.IP \fB\-s\fP
+Ensure that the data is written to the file after each line by calling
+.BR fdatasync (3).
+This will slow down a
+.BR fsck (8)
+process running in parallel.
.IP \fB\-v\fP
Show version.
.IP "\fB\-l\fP \fIlogfile\fP"
@@ -38,4 +45,4 @@
.SH AUTHOR
Miquel van Smoorenburg, miquels at cistron.nl
.SH "SEE ALSO"
-.BR dmesg (8)
+.BR dmesg (8), fdatasync (3).
Modified: sysvinit-upstream/trunk/src/bootlogd.c
===================================================================
--- sysvinit-upstream/trunk/src/bootlogd.c 2009-07-11 06:35:33 UTC (rev 1430)
+++ sysvinit-upstream/trunk/src/bootlogd.c 2009-07-11 06:42:26 UTC (rev 1431)
@@ -56,6 +56,7 @@
int got_signal = 0;
int didnl = 1;
+int syncalot = 0;
struct line {
char buf[256];
@@ -337,7 +338,7 @@
break;
case '\n':
didnl = 1;
- dosync = 1;
+ dosync = syncalot;
break;
case '\t':
line.pos += (line.pos / 8 + 1) * 8;
@@ -446,7 +447,7 @@
rotate = 0;
dontfork = 0;
- while ((i = getopt(argc, argv, "dl:p:rv")) != EOF) switch(i) {
+ while ((i = getopt(argc, argv, "dsl:p:rv")) != EOF) switch(i) {
case 'l':
logfile = optarg;
break;
@@ -463,6 +464,9 @@
case 'd':
dontfork = 1;
break;
+ case 's':
+ syncalot = 1;
+ break;
default:
usage();
break;
More information about the Pkg-sysvinit-commits
mailing list