diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-08-01 15:28:09 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-08-01 15:28:09 +0100 |
commit | 5dd83c7e6d9eb830707ff31702f3f09a4a22a260 (patch) | |
tree | ea65336ccbc170a737d301f5f30cf74c3ed9ab69 /xen/common/kernel.c | |
parent | 9212caa7a4c750a9aad9a58e4b4fe4fef7e13b8b (diff) | |
download | xen-5dd83c7e6d9eb830707ff31702f3f09a4a22a260.tar.gz xen-5dd83c7e6d9eb830707ff31702f3f09a4a22a260.tar.bz2 xen-5dd83c7e6d9eb830707ff31702f3f09a4a22a260.zip |
[XEN] Hide compile-time information values behind a
functional interface, so that the values are contained
within a single object file.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/common/kernel.c')
-rw-r--r-- | xen/common/kernel.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xen/common/kernel.c b/xen/common/kernel.c index dc76a893a3..5c3069bb62 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -8,7 +8,7 @@ #include <xen/init.h> #include <xen/lib.h> #include <xen/errno.h> -#include <xen/compile.h> +#include <xen/version.h> #include <xen/sched.h> #include <xen/shadow.h> #include <xen/guest_access.h> @@ -125,13 +125,13 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE(void) arg) { case XENVER_version: { - return (XEN_VERSION<<16) | (XEN_SUBVERSION); + return (xen_major_version() << 16) | xen_minor_version(); } case XENVER_extraversion: { xen_extraversion_t extraversion; - safe_strcpy(extraversion, XEN_EXTRAVERSION); + safe_strcpy(extraversion, xen_extra_version()); if ( copy_to_guest(arg, (char *)extraversion, sizeof(extraversion)) ) return -EFAULT; return 0; @@ -140,10 +140,10 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE(void) arg) case XENVER_compile_info: { struct xen_compile_info info; - safe_strcpy(info.compiler, XEN_COMPILER); - safe_strcpy(info.compile_by, XEN_COMPILE_BY); - safe_strcpy(info.compile_domain, XEN_COMPILE_DOMAIN); - safe_strcpy(info.compile_date, XEN_COMPILE_DATE); + safe_strcpy(info.compiler, xen_compiler()); + safe_strcpy(info.compile_by, xen_compile_by()); + safe_strcpy(info.compile_domain, xen_compile_domain()); + safe_strcpy(info.compile_date, xen_compile_date()); if ( copy_to_guest(arg, &info, 1) ) return -EFAULT; return 0; @@ -176,7 +176,7 @@ long do_xen_version(int cmd, XEN_GUEST_HANDLE(void) arg) case XENVER_changeset: { xen_changeset_info_t chgset; - safe_strcpy(chgset, XEN_CHANGESET); + safe_strcpy(chgset, xen_changeset()); if ( copy_to_guest(arg, (char *)chgset, sizeof(chgset)) ) return -EFAULT; return 0; |