projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a0b1d0
)
Compilation fix for system not providing OOM_SCORE_ADJ_MIN
author
Hannes Reinecke
<hare@suse.de>
Thu, 19 Apr 2012 12:03:26 +0000
(14:03 +0200)
committer
Christophe Varoqui
<christophe.varoqui@opensvc.com>
Fri, 20 Apr 2012 17:47:56 +0000
(19:47 +0200)
Newer systems do not provide a definition for OOM_SCORE_ADJ_MIN,
so we need to test against this.
Signed-off-by: Hannes Reinecke <hare@suse.de>
multipathd/main.c
patch
|
blob
|
history
diff --git
a/multipathd/main.c
b/multipathd/main.c
index
f7625ca
..
69cef3c
100644
(file)
--- a/
multipathd/main.c
+++ b/
multipathd/main.c
@@
-1504,9
+1504,15
@@
setscheduler (void)
static void
set_oom_adj (void)
{
+#ifdef OOM_SCORE_ADJ_MIN
int retry = 1;
char *file = "/proc/self/oom_score_adj";
int score = OOM_SCORE_ADJ_MIN;
+#else
+ int retry = 0;
+ char *file = "/proc/self/oom_adj";
+ int score = OOM_ADJUST_MIN;
+#endif
FILE *fp;
struct stat st;