OS (FreeBSD): fixes os-release not found when TARGET_DIR_ETC is set
Fixes #2759
This commit is contained in:
4 files changed
+29
-3
No files matched your search
@@ -31,6 +31,7 @@ Bugfixes:
|
||||
* Fixed out-of-bounds reads when parsing malformed CTA-861 EDID extensions. (General)
|
||||
* Fixed the init system executable path being truncated on platforms where POSIX `basename()` modifies its argument. (InitSystem, Linux)
|
||||
* Fixed undefined behavior from passing negative `char` values to ctype functions. (General)
|
||||
* Fixed OS detection failed when `TARGET_DIR_ETC` is set on FreeBSD. (OS, FreeBSD)
|
||||
|
||||
Logos:
|
||||
* Updated the CuerdOS logo and colors (#2712)
|
||||
|
||||
+1
-1
@@ -836,7 +836,7 @@ elseif(FreeBSD)
|
||||
src/detection/mouse/mouse_bsd.c
|
||||
src/detection/netio/netio_bsd.c
|
||||
src/detection/opengl/opengl_linux.c
|
||||
src/detection/os/os_linux.c
|
||||
src/detection/os/os_bsd.c
|
||||
src/detection/packages/packages_bsd.c
|
||||
src/detection/poweradapter/poweradapter_nosupport.c
|
||||
src/detection/gtk_qt/qt.c
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
#include "os.h"
|
||||
#include "common/properties.h"
|
||||
#include "common/strutil.h"
|
||||
|
||||
void ffDetectOSImpl(FFOSResult* result) {
|
||||
ffParsePropFileValues(
|
||||
#ifdef FF_CUSTOM_OS_RELEASE_PATH
|
||||
FF_STR(FF_CUSTOM_OS_RELEASE_PATH)
|
||||
#else
|
||||
"/etc/os-release"
|
||||
#endif
|
||||
,
|
||||
11,
|
||||
(FFpropquery[]){
|
||||
{ "PRETTY_NAME =", &result->prettyName },
|
||||
{ "NAME =", &result->name },
|
||||
{ "ID =", &result->id },
|
||||
{ "ID_LIKE =", &result->idLike },
|
||||
{ "VARIANT =", &result->variant },
|
||||
{ "VARIANT_ID =", &result->variantID },
|
||||
{ "VERSION =", &result->version },
|
||||
{ "VERSION_ID =", &result->versionID },
|
||||
{ "VERSION_CODENAME =", &result->codename },
|
||||
{ "CODENAME =", &result->codename },
|
||||
{ "BUILD_ID =", &result->buildID },
|
||||
});
|
||||
}
|
||||
@@ -403,7 +403,6 @@ static void detectOS(FFOSResult* os) {
|
||||
void ffDetectOSImpl(FFOSResult* os) {
|
||||
detectOS(os);
|
||||
|
||||
#if __linux__ || __GNU__
|
||||
if (ffStrbufEqualS(&os->id, "ubuntu")) {
|
||||
if (!getUbuntuFlavour(os)) {
|
||||
if (!ffStrbufEndsWithS(&os->prettyName, " (development branch)")) {
|
||||
@@ -426,5 +425,4 @@ void ffDetectOSImpl(FFOSResult* os) {
|
||||
} else if (ffStrbufEqualS(&os->id, "astra")) {
|
||||
detectAstraVersion(os);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user