[systemd-commits] 2 commits - src/umount.c TODO
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Jan 6 10:10:28 PST 2011
TODO | 2 ++
src/umount.c | 26 ++++++++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
New commits:
commit 7fc942b29e7bdb9d6aa3123f53da6680edabd8f0
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jan 6 19:10:17 2011 +0100
umount: don't try to detach the dm device the root dir is on, to minimize warning messages
diff --git a/src/umount.c b/src/umount.c
index 2ae8f86..4fd6b22 100644
--- a/src/umount.c
+++ b/src/umount.c
@@ -466,12 +466,24 @@ static int swap_points_list_off(MountPoint **head, bool *changed) {
static int loopback_points_list_detach(MountPoint **head, bool *changed) {
MountPoint *m, *n;
- int n_failed = 0;
+ int n_failed = 0, k;
+ struct stat root_st;
assert(head);
+ k = lstat("/", &root_st);
+
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
int r;
+ struct stat loopback_st;
+
+ if (k >= 0 &&
+ major(root_st.st_dev) != 0 &&
+ lstat(m->path, &loopback_st) >= 0 &&
+ root_st.st_dev == loopback_st.st_rdev) {
+ n_failed ++;
+ continue;
+ }
if ((r = delete_loopback(m->path)) >= 0) {
@@ -490,13 +502,23 @@ static int loopback_points_list_detach(MountPoint **head, bool *changed) {
static int dm_points_list_detach(MountPoint **head, bool *changed) {
MountPoint *m, *n;
- int n_failed = 0;
+ int n_failed = 0, k;
+ struct stat root_st;
assert(head);
+ k = lstat("/", &root_st);
+
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
int r;
+ if (k >= 0 &&
+ major(root_st.st_dev) != 0 &&
+ root_st.st_dev == m->devnum) {
+ n_failed ++;
+ continue;
+ }
+
if ((r = delete_dm(m->devnum)) >= 0) {
if (r > 0 && changed)
commit 35f10fccb06a0c7b4f26a28746db387aac376cb3
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Jan 6 18:54:10 2011 +0100
update TODO
diff --git a/TODO b/TODO
index 7f3ae5f..2262523 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,5 @@
+* configurable jitter for timer events
+
* dbus should run with oom adjust set
* support caching password questions in plymouth and on the console
More information about the systemd-commits
mailing list