2
* Copyright (C) 2005 Novell/SUSE
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License as
6
* published by the Free Software Foundation, version 2 of the
9
* AppArmor version definition
12
#ifndef APPARMOR_VERSION
13
#error "-DAPPARMOR_VERSION must be specified when compiling this file"
16
#define APPARMOR_VERSION_STR_PFX "APPARMOR_VERSION="
18
#include <linux/module.h>
19
MODULE_VERSION(APPARMOR_VERSION);
21
/* apparmor_version_str exists to allow a strings on module to
22
* see APPARMOR_VERSION= prefix
24
static const char *apparmor_version_str =
25
APPARMOR_VERSION_STR_PFX APPARMOR_VERSION;
27
/* apparmor_version_str_nl exists to allow an easy way to get a newline
28
* terminated string without having to do dynamic memory allocation
30
static const char *apparmor_version_str_nl = APPARMOR_VERSION "\n";
32
const char *apparmor_version(void)
34
const int len = sizeof(APPARMOR_VERSION_STR_PFX) - 1;
36
return apparmor_version_str + len;
39
const char *apparmor_version_nl(void)
41
return apparmor_version_str_nl;