[systemd-commits] 3 commits - CODING_STYLE README TODO src/fsck
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Oct 22 02:46:03 PDT 2014
CODING_STYLE | 15 +++++++++++++--
README | 3 ++-
TODO | 2 ++
src/fsck/fsck.c | 13 ++++---------
4 files changed, 21 insertions(+), 12 deletions(-)
New commits:
commit 48d3e8d07f2978f001cc85b2dddb7f8ec9d07006
Author: Karel Zak <kzak at redhat.com>
Date: Wed Oct 22 10:28:42 2014 +0200
fsck: re-enable fsck -l
The -l (lock) has been temporary disabled due to conflict with
udev (https://bugs.freedesktop.org/show_bug.cgi?id=79576)
The problem is fixed since util-linux v2.25 (Jul 2014).
diff --git a/README b/README
index e0edd41..8f7a96e 100644
--- a/README
+++ b/README
@@ -129,8 +129,9 @@ REQUIREMENTS:
During runtime, you need the following additional
dependencies:
- util-linux >= v2.19 (requires fsck -l, agetty -s),
+ util-linux >= v2.19 required for agetty -s
v2.21 required for tests in test/
+ v2.25 required for fsck -l
dbus >= 1.4.0 (strictly speaking optional, but recommended)
sulogin (from util-linux >= 2.22 or sysvinit-tools, optional but recommended,
required for tests in test/)
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index dfe97bc..70a5918 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -320,16 +320,11 @@ int main(int argc, char *argv[]) {
cmdline[i++] = "-T";
/*
- * Disable locking which conflict with udev's event
- * ownershipi, until util-linux moves the flock
- * synchronization file which prevents multiple fsck running
- * on the same rotationg media, from the disk device
- * node to a privately owned regular file.
- *
- * https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
- *
- * cmdline[i++] = "-l";
+ * Since util-linux v2.25 fsck uses /run/fsck/<diskname>.lock files.
+ * The previous versions use flock for the device and conflict with
+ * udevd, see https://bugs.freedesktop.org/show_bug.cgi?id=79576#c5
*/
+ cmdline[i++] = "-l";
if (!root_directory)
cmdline[i++] = "-M";
commit 39bb33c19203bdcd8857e9dc9ee6c8f03da77b71
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Oct 22 11:45:01 2014 +0200
Update TODO
diff --git a/TODO b/TODO
index 8e66e2d..7df665e 100644
--- a/TODO
+++ b/TODO
@@ -41,6 +41,8 @@ External:
Features:
+* add a system-wide shutdown timeout, similar to the startup timeout we already have (see fdo bz #84110)
+
* maybe provide an API to allow migration of foreign PIDs into existing scopes.
* kdbus: maybe rename "connection name" concept to something that doesn't reuse the word "name"?
commit 61f33134fc9231e07e1b9519b140d68139e9fad0
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Oct 22 11:09:00 2014 +0200
CODING_STYLE: clarify that single-line if blocks should not be enclosed in {}
diff --git a/CODING_STYLE b/CODING_STYLE
index 05b5ecf..598d241 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -18,7 +18,7 @@
- For robustness reasons, destructors should be able to destruct
half-initialized objects, too
-- Error codes are returned as negative Exxx. i.e. return -EINVAL. There
+- Error codes are returned as negative Exxx. e.g. return -EINVAL. There
are some exceptions: for constructors, it is OK to return NULL on
OOM. For lookup functions, NULL is fine too for "not found".
@@ -57,7 +57,7 @@
doing something wrong!
- Stay uniform. For example, always use "usec_t" for time
- values. Do not usec mix msec, and usec and whatnot.
+ values. Do not mix usec and msec, and usec and whatnot.
- Make use of _cleanup_free_ and friends. It makes your code much
nicer to read!
@@ -79,6 +79,17 @@
But it is OK if you do not.
+- Single-line "if" blocks should not be enclosed in {}. Use this:
+
+ if (foobar)
+ waldo();
+
+ instead of this:
+
+ if (foobar) {
+ waldo();
+ }
+
- Do not write "foo ()", write "foo()".
- Please use streq() and strneq() instead of strcmp(), strncmp() where applicable.
More information about the systemd-commits
mailing list