SHA256
1
0
forked from pool/systemd

- 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
This commit is contained in:
Frederic Crozat 2012-06-07 13:29:24 +00:00 committed by Git OBS Bridge
parent 8fa53b7345
commit 9058633033
3 changed files with 43 additions and 0 deletions

36
fix-swap-priority.patch Normal file
View File

@ -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,

View File

@ -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 Fri May 25 11:08:27 UTC 2012 - fcrozat@suse.com

View File

@ -93,6 +93,7 @@ Patch40: 0001-util-never-follow-symlinks-in-rm_rf_children.patch
Patch42: fixppc.patch Patch42: fixppc.patch
Patch43: logind-logout.patch Patch43: logind-logout.patch
Patch44: fix-getty-isolate.patch Patch44: fix-getty-isolate.patch
Patch45: fix-swap-priority.patch
%description %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -157,6 +158,7 @@ Plymouth integration for systemd
%patch42 -p1 %patch42 -p1
%patch43 -p1 %patch43 -p1
%patch44 -p1 %patch44 -p1
%patch45 -p1
%build %build
autoreconf -fiv autoreconf -fiv