Package: asmon
Version: 0.71-4
Tags: patch

Asmon checks for Linux 2.6 vs older Linux by checking if the running
major and minor version are exactly 2 and 6. So, if we're on Linux 3.x,
it assumes we're on an older Linux, and it gets the meminfo format wrong
(and possibly other things).

Since Linux 3.x is the same as 2.6 for the purposes of asmon (for now,
anyway), we should treat them as the same. Patch attached to do just
that.

-- 
Andrew Deason
[email protected]
>From 9152af9a9b316cdb2ebd505ba2b83f26a09ca20a Mon Sep 17 00:00:00 2001
From: Andrew Deason <[email protected]>
Date: Sat, 27 Aug 2011 15:18:45 -0500
Subject: [PATCH] Support Linux 3.x and beyond

Assume that Linux 3.x and later is the same as Linux 2.6.
---
 asmon/asmon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/asmon/asmon.c b/asmon/asmon.c
index 3460b1b..a3d101b 100644
--- a/asmon/asmon.c
+++ b/asmon/asmon.c
@@ -160,7 +160,7 @@ exit(0);
             {
                 sscanf(name.release, "%d.%d.%d", &kernMajor, &kernMinor, 
 				&kernRev);
-		if(( kernMajor == 2 ) && ( kernMinor == 6 ))
+		if((( kernMajor == 2 ) && ( kernMinor == 6 )) || ( kernMajor > 2 ))
 		    has_kern26 = 1;
 	    }
     	}
-- 
1.7.5.4

Reply via email to