Cleanup system-revision stuff.
* move system_revision.h to headers/private/libroot * unify libroot's get_system_revision() (the one I introduced recently) with kernel's get_haiku_revision(), the function is now called get_haiku_revision() in the kernel and __get_haiku_revision() in libroot * system_revision.c is now being built as part of libroot and as part of the kernel * adjusted all callers of get_system_revision() accordingly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41516 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+8
-4
@@ -2,8 +2,8 @@
|
|||||||
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>.
|
* Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _SYSTEM_SYSTEM_REVISION_H
|
#ifndef _LIBROOT_SYSTEM_REVISION_H
|
||||||
#define _SYSTEM_SYSTEM_REVISION_H
|
#define _LIBROOT_SYSTEM_REVISION_H
|
||||||
|
|
||||||
|
|
||||||
/** The length of the system revision character array symbol living in libroot
|
/** The length of the system revision character array symbol living in libroot
|
||||||
@@ -17,7 +17,11 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
/** returns the system revision */
|
/** returns the system revision */
|
||||||
const char* get_system_revision();
|
#ifdef _KERNEL_MODE
|
||||||
|
const char* get_haiku_revision(void);
|
||||||
|
#else
|
||||||
|
const char* __get_haiku_revision(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -25,4 +29,4 @@ const char* get_system_revision();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* _SYSTEM_SYSTEM_REVISION_H */
|
#endif /* _LIBROOT_SYSTEM_REVISION_H */
|
||||||
@@ -542,7 +542,7 @@ AboutView::AboutView()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add system revision
|
// Add system revision
|
||||||
const char* haikuRevision = get_system_revision();
|
const char* haikuRevision = __get_haiku_revision();
|
||||||
if (haikuRevision != NULL) {
|
if (haikuRevision != NULL) {
|
||||||
strlcat(string, " (", sizeof(string));
|
strlcat(string, " (", sizeof(string));
|
||||||
strlcat(string, B_TRANSLATE("Revision"), sizeof(string));
|
strlcat(string, B_TRANSLATE("Revision"), sizeof(string));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
SubDir HAIKU_TOP src apps aboutsystem ;
|
SubDir HAIKU_TOP src apps aboutsystem ;
|
||||||
|
|
||||||
UsePrivateHeaders app shared system ;
|
UsePrivateHeaders app libroot shared ;
|
||||||
|
|
||||||
Application AboutSystem :
|
Application AboutSystem :
|
||||||
AboutSystem.cpp
|
AboutSystem.cpp
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ KernelMergeObject kernel_os_main.o :
|
|||||||
driver_settings.cpp
|
driver_settings.cpp
|
||||||
find_directory.cpp
|
find_directory.cpp
|
||||||
fs_info.c
|
fs_info.c
|
||||||
|
system_revision.c
|
||||||
wait_for_objects.cpp
|
wait_for_objects.cpp
|
||||||
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
: $(TARGET_KERNEL_PIC_CCFLAGS)
|
||||||
;
|
;
|
||||||
@@ -17,6 +18,7 @@ SEARCH on [ FGristFiles
|
|||||||
driver_settings.cpp
|
driver_settings.cpp
|
||||||
find_directory.cpp
|
find_directory.cpp
|
||||||
fs_info.c
|
fs_info.c
|
||||||
|
system_revision.c
|
||||||
wait_for_objects.cpp
|
wait_for_objects.cpp
|
||||||
] = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
|
] = [ FDirName $(HAIKU_TOP) src system libroot os ] ;
|
||||||
|
|
||||||
|
|||||||
@@ -43,18 +43,12 @@ const static int64 kKernelVersion = 0x1;
|
|||||||
const static char *kKernelName = "kernel_" HAIKU_ARCH;
|
const static char *kKernelName = "kernel_" HAIKU_ARCH;
|
||||||
|
|
||||||
|
|
||||||
// Haiku SVN revision. Will be set when copying the kernel to the image.
|
|
||||||
// Lives in a separate section so that it can easily be found.
|
|
||||||
static char sHaikuRevision[SYSTEM_REVISION_LENGTH]
|
|
||||||
__attribute__((section("_haiku_revision")));
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dump_info(int argc, char **argv)
|
dump_info(int argc, char **argv)
|
||||||
{
|
{
|
||||||
kprintf("kernel build: %s %s (gcc%d %s)\n", __DATE__, __TIME__, __GNUC__,
|
kprintf("kernel build: %s %s (gcc%d %s)\n", __DATE__, __TIME__, __GNUC__,
|
||||||
__VERSION__);
|
__VERSION__);
|
||||||
kprintf("revision: %s\n\n", sHaikuRevision);
|
kprintf("revision: %s\n\n", get_haiku_revision());
|
||||||
|
|
||||||
kprintf("cpu count: %ld, active times:\n", smp_get_num_cpus());
|
kprintf("cpu count: %ld, active times:\n", smp_get_num_cpus());
|
||||||
|
|
||||||
@@ -468,13 +462,6 @@ system_notifications_init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char*
|
|
||||||
get_haiku_revision(void)
|
|
||||||
{
|
|
||||||
return sHaikuRevision;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ static char sHaikuRevision[SYSTEM_REVISION_LENGTH]
|
|||||||
|
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
get_system_revision()
|
#ifdef _KERNEL_MODE
|
||||||
|
get_haiku_revision(void)
|
||||||
|
#else
|
||||||
|
__get_haiku_revision(void)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return sHaikuRevision;
|
return sHaikuRevision;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ uname(struct utsname *info)
|
|||||||
|
|
||||||
strlcpy(info->sysname, "Haiku", sizeof(info->sysname));
|
strlcpy(info->sysname, "Haiku", sizeof(info->sysname));
|
||||||
|
|
||||||
haikuRevision = get_system_revision();
|
haikuRevision = __get_haiku_revision();
|
||||||
if (haikuRevision[0] != '\0')
|
if (haikuRevision[0] != '\0')
|
||||||
snprintf(info->version, sizeof(info->version), "%s ", haikuRevision);
|
snprintf(info->version, sizeof(info->version), "%s ", haikuRevision);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user