LibCore: Remove SerenityOS specific version number code

This commit is contained in:
Tim Ledbetter 2024-10-24 11:14:20 +01:00 committed by Tim Ledbetter
parent ebb8342cf2
commit e815847f86
Notes: github-actions[bot] 2024-10-29 13:31:28 +00:00

View file

@ -7,27 +7,11 @@
#include <AK/String.h>
#include <LibCore/Version.h>
#ifdef AK_OS_SERENITY
# include <sys/utsname.h>
#endif
namespace Core::Version {
ErrorOr<String> read_long_version_string()
{
#ifdef AK_OS_SERENITY
struct utsname uts;
int rc = uname(&uts);
if ((rc) < 0) {
return Error::from_syscall("uname"sv, rc);
}
auto const* version = uts.release;
auto const* git_hash = uts.version;
return String::formatted("Version {} revision {}", version, git_hash);
#else
return "Version 1.0"_string;
#endif
}
}