mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibCore: Remove SerenityOS specific version number code
This commit is contained in:
parent
ebb8342cf2
commit
e815847f86
Notes:
github-actions[bot]
2024-10-29 13:31:28 +00:00
Author: https://github.com/tcl3
Commit: e815847f86
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1940
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 0 additions and 16 deletions
|
@ -7,27 +7,11 @@
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <LibCore/Version.h>
|
#include <LibCore/Version.h>
|
||||||
|
|
||||||
#ifdef AK_OS_SERENITY
|
|
||||||
# include <sys/utsname.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Core::Version {
|
namespace Core::Version {
|
||||||
|
|
||||||
ErrorOr<String> read_long_version_string()
|
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;
|
return "Version 1.0"_string;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue