lkml.org 
[lkml]   [1999]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: stable kernel macro?
Hi Jeff.

> Is there a generic way to detect, via the C pre-processor,
> whether the kernel is a stable or experimental series?

I don't know about "via the C pre-processor", but you could try one of
the following bash commands:

1. To detect whether the currently running kernel is from a
stable series:

if [ $[`uname -r | cut -d . -f 2`%2] -eq 0 ]; then
echo STABLE
else
echo DEVELOPMENT
fi

2. To detect whether the kernel source in /usr/src/linux is
from a stable series:

TEST=`grep ^PATCHLEVEL /usr/src/linux/ | head -1`
if [ $[`echo $TEST | cut -d ' ' -f 3`%2] -eq 0 ]; then
echo STABLE
else
echo DEVELOPMENT
fi

Best wishes from Riley.

+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.032 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site