Expose McKernel version in /proc/mckernel
Change-Id: Ica0fbb0ff70a4ff2559e92738926279a3ae78a21
This commit is contained in:
committed by
Dominique Martinet
parent
1253f4d18c
commit
e12d5ed341
@ -54,12 +54,18 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* IHK version string */
|
||||
#undef IHK_VERSION
|
||||
|
||||
/* McKernel specific headers */
|
||||
#undef MCKERNEL_INCDIR
|
||||
|
||||
/* McKernel specific libraries */
|
||||
#undef MCKERNEL_LIBDIR
|
||||
|
||||
/* McKernel version string */
|
||||
#undef MCKERNEL_VERSION
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
|
||||
11
configure
vendored
11
configure
vendored
@ -4837,6 +4837,17 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define IHK_VERSION "$IHK_VERSION"
|
||||
_ACEOF
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define MCKERNEL_VERSION "$MCKERNEL_VERSION"
|
||||
_ACEOF
|
||||
|
||||
|
||||
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
||||
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
||||
BUILDID=$( cd $IHK_ABS_SRCDIR; if [ ! -d .git ]; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
|
||||
|
||||
@ -504,6 +504,9 @@ fi
|
||||
AC_DEFINE_UNQUOTED(BINDIR,"$BINDIR",[Path of install directory for binary])
|
||||
AC_DEFINE_UNQUOTED(SBINDIR,"$SBINDIR",[Path of install directory for system binary])
|
||||
|
||||
AC_DEFINE_UNQUOTED(IHK_VERSION,"$IHK_VERSION",[IHK version string])
|
||||
AC_DEFINE_UNQUOTED(MCKERNEL_VERSION,"$MCKERNEL_VERSION",[McKernel version string])
|
||||
|
||||
ABS_SRCDIR=$( cd $( dirname $0 ); pwd )
|
||||
IHK_ABS_SRCDIR=${ABS_SRCDIR}/../ihk
|
||||
BUILDID=$( cd $IHK_ABS_SRCDIR; if @<:@ ! -d .git @:>@; then echo $IHK_VERSION; else bash -c 'git rev-list -1 HEAD | cut -c1-8'; fi )
|
||||
|
||||
@ -1138,5 +1138,6 @@ static const struct procfs_entry base_entry_stuff[] = {
|
||||
// PROC_REG("vmallocinfo",S_IRUSR, NULL),
|
||||
// PROC_REG("vmstat", S_IRUGO, NULL),
|
||||
// PROC_REG("zoneinfo", S_IRUGO, NULL),
|
||||
PROC_REG("mckernel", S_IRUGO, &mckernel_buff_io),
|
||||
PROC_TERM
|
||||
};
|
||||
|
||||
@ -309,6 +309,15 @@ int process_procfs_request(struct ikc_scd_packet *rpacket)
|
||||
hold_process_vm(vm);
|
||||
process_unlock(proc, &lock);
|
||||
}
|
||||
else if (!strcmp(p, "mckernel")) {
|
||||
ans = snprintf(buf, count, "%s-%s\n",
|
||||
MCKERNEL_VERSION, BUILDID);
|
||||
|
||||
if (buf_add(&buf_top, &buf_cur, buf, ans) < 0)
|
||||
goto err;
|
||||
ans = 0;
|
||||
goto end;
|
||||
}
|
||||
else if (!strcmp(p, "stat")) { /* "/proc/stat" */
|
||||
extern int num_processors; /* kernel/ap.c */
|
||||
int cpu;
|
||||
|
||||
Reference in New Issue
Block a user