FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-19-2012, 12:03 PM
Hannes Reinecke
 
Default Compilation fix for system not providing OOM_SCORE_ADJ_MIN

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 | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/multipathd/main.c b/multipathd/main.c
index 3845880..a3f82d1 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1483,9 +1483,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;

--
1.7.3.4

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 06:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org