source: gpfs_3.1_ker2.6.20/lpp/mmfs/src/misc/getupdatelevel.c @ 41

Last change on this file since 41 was 16, checked in by rock, 17 years ago
File size: 675 bytes
RevLine 
[16]1static char sccsid[] = "@(#)69  1.2  src/avs/fs/tools/getupdatelevel.c, mmfs, avs_rgpfs24, rgpfs240610b 2/27/06 02:45:28";
2
3#include <stdio.h>
4#include <linux/config.h>
5#include <linux/version.h>
6
7main()
8{
9#if defined(SUSE_LINUX) && LINUX_KERNEL_VERSION >= 2060507 \
10     && (CONFIG_SUSE_KERNEL == 1) && defined(CONFIG_RELEASE) && defined(KERNEL_VERSION)
11  int level, fix_level;
12  int kernel_level = KERNEL_VERSION(2,6,5);
13
14  if ( kernel_level == LINUX_VERSION_CODE || level >= 7 )
15  {
16    sscanf(CONFIG_RELEASE,"%d.%d",&level,&fix_level);
17    if (level == 7 && fix_level >= 97)
18    {
19       printf("-DSUSE_LINUX_UPDATE_SUBLEVEL=%d00000000\n",fix_level);
20    }
21  }
22
23#endif
24
25}
Note: See TracBrowser for help on using the repository browser.