From 9058633033c760fdb3b288b729ae023a682923d9a62f705f2bf0be4ef3e7d19c Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Thu, 7 Jun 2012 13:29:24 +0000 Subject: [PATCH] - Add fix-swap-priority: fix default swap priority (bnc#731601). OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=277 --- fix-swap-priority.patch | 36 ++++++++++++++++++++++++++++++++++++ systemd.changes | 5 +++++ systemd.spec | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 fix-swap-priority.patch diff --git a/fix-swap-priority.patch b/fix-swap-priority.patch new file mode 100644 index 00000000..2c3fd5f1 --- /dev/null +++ b/fix-swap-priority.patch @@ -0,0 +1,36 @@ +Index: systemd-37/src/mount.c +=================================================================== +--- systemd-37.orig/src/mount.c ++++ systemd-37/src/mount.c +@@ -1485,7 +1485,7 @@ fail: + return r; + } + +-static int mount_find_pri(char *options) { ++static int mount_find_pri(char *options, int *ret) { + char *end, *pri; + unsigned long r; + +@@ -1503,7 +1503,8 @@ static int mount_find_pri(char *options) + if (end == pri || (*end != ',' && *end != 0)) + return -EINVAL; + +- return (int) r; ++ *ret = (int) r; ++ return 1; + } + + static int mount_load_etc_fstab(Manager *m) { +@@ -1539,9 +1540,10 @@ static int mount_load_etc_fstab(Manager + path_kill_slashes(where); + + if (streq(me->mnt_type, "swap")) { +- int pri; ++ int r, pri = -1; + +- if ((pri = mount_find_pri(me->mnt_opts)) < 0) ++ r = mount_find_pri(me->mnt_opts,&pri); ++ if (r < 0) + k = pri; + else + k = swap_add_one(m, diff --git a/systemd.changes b/systemd.changes index b77412ed..102a346e 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 7 13:14:40 UTC 2012 - fcrozat@suse.com + +- Add fix-swap-priority: fix default swap priority (bnc#731601). + ------------------------------------------------------------------- Fri May 25 11:08:27 UTC 2012 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index f67da68a..cace4967 100644 --- a/systemd.spec +++ b/systemd.spec @@ -93,6 +93,7 @@ Patch40: 0001-util-never-follow-symlinks-in-rm_rf_children.patch Patch42: fixppc.patch Patch43: logind-logout.patch Patch44: fix-getty-isolate.patch +Patch45: fix-swap-priority.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -157,6 +158,7 @@ Plymouth integration for systemd %patch42 -p1 %patch43 -p1 %patch44 -p1 +%patch45 -p1 %build autoreconf -fiv